projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Clean up static analyzer warnings.
[oota-llvm.git]
/
include
/
llvm
/
ADT
/
BitVector.h
diff --git
a/include/llvm/ADT/BitVector.h
b/include/llvm/ADT/BitVector.h
index 34e2284311b39e7049ff33ac2c698056505e4b88..bedb47147cb0d4960df555055e6c4d814231b89a 100644
(file)
--- a/
include/llvm/ADT/BitVector.h
+++ b/
include/llvm/ADT/BitVector.h
@@
-450,6
+450,7
@@
public:
// Grow the bitvector to have enough elements.
Capacity = RHSWords;
+ assert(Capacity > 0 && "negative capacity?");
BitWord *NewBits = (BitWord *)std::malloc(Capacity * sizeof(BitWord));
std::memcpy(NewBits, RHS.Bits, Capacity * sizeof(BitWord));