aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/Support
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-30 21:35:30 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-30 21:35:30 +0000
commitbf98c99600017bfcdde2a7966c47a6beb15a96dc (patch)
tree3e07521a56372988baaa16341f74813e2245f802 /include/clang/Analysis/Support
parentf87a0ccb05eb2aa095ea835fdcdf4a0363637b28 (diff)
Fix horrible non-termination bug in LiveVariables. The issue was that
the liveness state of block-level expressions could oscillate because of two issues: - The initial value before a merge was not always set to "Top" - The set of live block-level expressions is a union, not an intersection This fixes <rdar://problem/650084>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Analysis/Support')
-rw-r--r--include/clang/Analysis/Support/BlkExprDeclBitVector.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/Analysis/Support/BlkExprDeclBitVector.h b/include/clang/Analysis/Support/BlkExprDeclBitVector.h
index 5bd42332ba..a592be8154 100644
--- a/include/clang/Analysis/Support/BlkExprDeclBitVector.h
+++ b/include/clang/Analysis/Support/BlkExprDeclBitVector.h
@@ -216,8 +216,7 @@ struct StmtDeclBitVector_Types {
}
public:
-
-
+
void resetBlkExprValues(AnalysisDataTy& AD) {
BlkExprBV.resize(AD.getNumBlkExprs());
BlkExprBV.reset();
@@ -233,6 +232,11 @@ struct StmtDeclBitVector_Types {
resetBlkExprValues(AD);
}
+ void setValues(AnalysisDataTy& AD) {
+ setDeclValues(AD);
+ setBlkExprValues(AD);
+ }
+
bool operator==(const ValTy& RHS) const {
return ParentRef(*this) == ParentRef(RHS)
&& BlkExprBV == RHS.BlkExprBV;