From a40bcac0ef14489e0cbde6c5637598ceae3f77d8 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Fri, 14 Dec 2012 19:08:20 +0000 Subject: [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 --- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core') 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()) { -- cgit v1.2.3