[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
This commit is contained in:
Anna Zaks 2012-12-14 19:08:20 +00:00
parent 5f2af81e79
commit a40bcac0ef
1 changed files with 3 additions and 3 deletions

View File

@ -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()) {