================
@@ -818,27 +799,23 @@ void ExprEngine::VisitGuardedExpr(const Expr *Ex,
getNumVisitedCurrent());
// Generate a new node with the binding from the appropriate path.
- B.generateNode(Ex, Pred, state->BindExpr(Ex, SF, V, true));
+ Dst.insert(Engine.makeNodeWithBinding(Pred, Ex, V));
}
-void ExprEngine::
-VisitOffsetOfExpr(const OffsetOfExpr *OOE,
- ExplodedNode *Pred, ExplodedNodeSet &Dst) {
- NodeBuilder B(Pred, Dst, *currBldrCtx);
+void ExprEngine::VisitOffsetOfExpr(const OffsetOfExpr *OOE, ExplodedNode *Pred,
+ ExplodedNodeSet &Dst) {
Expr::EvalResult Result;
if (OOE->EvaluateAsInt(Result, getContext())) {
APSInt IV = Result.Val.getInt();
assert(IV.getBitWidth() == getContext().getTypeSize(OOE->getType()));
assert(OOE->getType()->castAs<BuiltinType>()->isInteger());
assert(IV.isSigned() == OOE->getType()->isSignedIntegerType());
SVal X = svalBuilder.makeIntVal(IV);
- B.generateNode(OOE, Pred,
- Pred->getState()->BindExpr(OOE, Pred->getStackFrame(), X));
+ Dst.insert(Engine.makeNodeWithBinding(Pred, OOE, X));
}
// FIXME: Handle the case where __builtin_offsetof is not a constant.
}
-
----------------
tigbr wrote:
I see. When that branch is not executed, `Dst` should still contain at least
`Pred`, because `NodeBuilder` used to do a `Dst.insert(Pred)` upon creation.
https://github.com/llvm/llvm-project/pull/212186
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits