[cfe-commits] r44813 - /cfe/trunk/include/clang/Analysis/ExprDeclBitVector.h
Ted Kremenek
kremenek at apple.com
Mon Dec 10 14:01:22 PST 2007
Author: kremenek
Date: Mon Dec 10 16:01:22 2007
New Revision: 44813
URL: http://llvm.org/viewvc/llvm-project?rev=44813&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/Analysis/ExprDeclBitVector.h
Modified: cfe/trunk/include/clang/Analysis/ExprDeclBitVector.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ExprDeclBitVector.h?rev=44813&r1=44812&r2=44813&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/ExprDeclBitVector.h (original)
+++ cfe/trunk/include/clang/Analysis/ExprDeclBitVector.h Mon Dec 10 16:01:22 2007
@@ -73,7 +73,7 @@
public:
void resetValues(AnalysisDataTy& AD) {
- DeclBV.resize(AD.getNumDecls());
+ DeclBV.resize(AD.getNumDecls()+1);
DeclBV.reset();
}
@@ -172,7 +172,7 @@
void resetValues(AnalysisDataTy& AD) {
ParentRef(*this).resetValues(AD);
- ExprBV.resize(AD.getNumExprs());
+ ExprBV.resize(AD.getNumExprs()+1);
ExprBV.reset();
}
More information about the cfe-commits
mailing list