================
@@ -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);
}
----------------
steakhal wrote:
I was thinking maybe we could swap the two branches and put a continue here to
avoid nesting the bigger block.
https://github.com/llvm/llvm-project/pull/204371
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits