summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-12-14 19:08:20 +0000
committerAnna Zaks <ganna@apple.com>2012-12-14 19:08:20 +0000
commita40bcac0ef14489e0cbde6c5637598ceae3f77d8 (patch)
tree9f18bf6e7e7a7f17627b252a3d0f3e9c91c266c7 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
parent5f2af81e793731cdd3a66deff7947528ba127d1b (diff)
downloadbcm5719-llvm-a40bcac0ef14489e0cbde6c5637598ceae3f77d8.tar.gz
bcm5719-llvm-a40bcac0ef14489e0cbde6c5637598ceae3f77d8.zip
[analyzer] Propagate the checker's state from checkBranchCondition
Fixes a bug, where we were dropping the state modifications from the checkBranchCondition checker callback. llvm-svn: 170232
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 26575732c10..5c91dd288fa 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -1217,8 +1217,8 @@ void ExprEngine::processBranch(const Stmt *Condition, const Stmt *Term,
if (PredI->isSink())
continue;
- ProgramStateRef PrevState = Pred->getState();
- SVal X = PrevState->getSVal(Condition, Pred->getLocationContext());
+ ProgramStateRef PrevState = PredI->getState();
+ SVal X = PrevState->getSVal(Condition, PredI->getLocationContext());
if (X.isUnknownOrUndef()) {
// Give it a chance to recover from unknown.
@@ -1230,7 +1230,7 @@ void ExprEngine::processBranch(const Stmt *Condition, const Stmt *Term,
// underlying value and use that instead.
SVal recovered = RecoverCastedSymbol(getStateManager(),
PrevState, Condition,
- Pred->getLocationContext(),
+ PredI->getLocationContext(),
getContext());
if (!recovered.isUnknown()) {
OpenPOWER on IntegriCloud