aboutsummaryrefslogtreecommitdiff
path: root/Analysis
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-24 19:28:01 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-24 19:28:01 +0000
commitdaadf450d0dc51a45cd6610ee09060a6b98d6ecf (patch)
treed0700c4a92fd1f2c2d8f62868c83def5372581b5 /Analysis
parente0cf9c85fe0c02f82a3e7bb65a2d3085548398c3 (diff)
Fixed a bug where the values of block-level expressions were being recorded in
the value map as if the expressions were non-block-level expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Analysis')
-rw-r--r--Analysis/GRConstants.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Analysis/GRConstants.cpp b/Analysis/GRConstants.cpp
index 35758c672e..9db8e7f196 100644
--- a/Analysis/GRConstants.cpp
+++ b/Analysis/GRConstants.cpp
@@ -608,8 +608,7 @@ public:
/// mappings removed.
StateTy RemoveDeadBindings(Stmt* S, StateTy M);
- StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V,
- bool isBlkExpr = false);
+ StateTy SetValue(StateTy St, Stmt* S, const ExprValue& V);
StateTy SetValue(StateTy St, const LValue& LV, const ExprValue& V);
@@ -726,13 +725,15 @@ LValue GRConstants::GetLValue(const StateTy& St, Stmt* S) {
}
GRConstants::StateTy GRConstants::SetValue(StateTy St, Stmt* S,
- const ExprValue& V, bool isBlkExpr) {
+ const ExprValue& V) {
if (!StateCleaned) {
St = RemoveDeadBindings(CurrentStmt, St);
StateCleaned = true;
}
+ bool isBlkExpr = S == CurrentStmt && getCFG().isBlkExpr(S);
+
return V.isValid() ? StateMgr.Add(St, ValueKey(S,isBlkExpr), V)
: St;
}