void GRExprEngine::ProcessBranch(Stmt* Condition, Stmt* Term,
BranchNodeBuilder& builder) {
- PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
- Condition->getLocStart(),
- "Error evaluating branch");
-
// Remove old bindings for subexpressions.
const GRState* PrevState =
StateMgr.RemoveSubExprBindings(builder.getState());
return;
}
+ PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),
+ Condition->getLocStart(),
+ "Error evaluating branch");
+
SVal V = GetSVal(PrevState, Condition);
switch (V.getBaseKind()) {
continue;
}
- // Handle all other values.
-
+ // Handle all other values.
BinaryOperator::Opcode Op = U->isIncrementOp() ? BinaryOperator::Add
: BinaryOperator::Sub;
-
+
SVal Result = EvalBinOp(Op, V2, MakeConstantVal(1U, U));
state = BindExpr(state, U, U->isPostfix() ? V2 : Result);