================
@@ -3747,16 +3747,20 @@ void
ExprEngine::evalEagerlyAssumeBifurcation(ExplodedNodeSet &Dst,
// First assume that the condition is true.
if (StateTrue) {
SVal Val = svalBuilder.makeIntVal(1U, Ex->getType());
- StateTrue = StateTrue->BindExpr(Ex, Pred->getStackFrame(), Val);
- Bldr.generateNode(Ex, Pred, StateTrue, TrueTag);
+ StateTrue = StateTrue->BindExpr(Ex, SF, Val);
+ PostStmt PostStmtTrue(Ex, SF, TrueTag);
+ Dst.insert(Engine.makeNode(PostStmtTrue, StateTrue, Pred));
}
// Next, assume that the condition is false.
if (StateFalse) {
SVal Val = svalBuilder.makeIntVal(0U, Ex->getType());
- StateFalse = StateFalse->BindExpr(Ex, Pred->getStackFrame(), Val);
- Bldr.generateNode(Ex, Pred, StateFalse, FalseTag);
+ StateFalse = StateFalse->BindExpr(Ex, SF, Val);
+ PostStmt PostStmtFalse(Ex, SF, FalseTag);
+ Dst.insert(Engine.makeNode(PostStmtFalse, StateFalse, Pred));
}
+ } else {
+ Dst.insert(Pred);
}
----------------
NagyDonat wrote:
I also thought about this a bit, but kept the current approach in order to
preserve the git history of the body of the `if` block (which would all end up
getting blamed to me if I reduce the indentation level).
However, I'm pretty much indifferent among the two approaches, and I can swap
the branches if you would prefer.
https://github.com/llvm/llvm-project/pull/204371
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits