aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/ExprDeclBitVector.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-10 22:01:22 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-10 22:01:22 +0000
commit76315cabb3d65145dd1f49696c725c04df378cd5 (patch)
tree6196ca0f5c361eb0b1e59fd3ec144a855bd0f7ab /include/clang/Analysis/ExprDeclBitVector.h
parent4fd46bc65115e5c37b412f5420e99f9b587d4010 (diff)
Fixed off-by-one-error when resizing Bitvectors used for
dataflow analysis over expressions and decls. This should fix bug 1847: http://llvm.org/bugs/show_bug.cgi?id=1847 Thanks to Török Edwin for providing a test case that identified the problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/ExprDeclBitVector.h')
-rw-r--r--include/clang/Analysis/ExprDeclBitVector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clang/Analysis/ExprDeclBitVector.h b/include/clang/Analysis/ExprDeclBitVector.h
index 4cd9faa260..2ddd985f4c 100644
--- a/include/clang/Analysis/ExprDeclBitVector.h
+++ b/include/clang/Analysis/ExprDeclBitVector.h
@@ -73,7 +73,7 @@ struct DeclBitVector_Types {
public:
void resetValues(AnalysisDataTy& AD) {
- DeclBV.resize(AD.getNumDecls());
+ DeclBV.resize(AD.getNumDecls()+1);
DeclBV.reset();
}
@@ -172,7 +172,7 @@ struct ExprDeclBitVector_Types {
void resetValues(AnalysisDataTy& AD) {
ParentRef(*this).resetValues(AD);
- ExprBV.resize(AD.getNumExprs());
+ ExprBV.resize(AD.getNumExprs()+1);
ExprBV.reset();
}