[clang] [NFC][analyzer] Eliminate NodeBuilder from ExprEngine visit methods and from their utility methods (PR #212186)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 30 03:07:26 PDT 2026
================
@@ -1027,23 +1022,21 @@ void ExprEngine::VisitCXXNewExpr(const CXXNewExpr *CNE, ExplodedNode *Pred,
// If the array is list initialized, we bind the initializer list to the
// memory region here, otherwise we would lose it.
if (isInitList) {
- Bldr.takeNodes(Pred);
- Pred = Bldr.generateNode(CNE, Pred, State);
+ Pred = Engine.makePostStmtNode(CNE, State, Pred);
SVal V = State->getSVal(Init, SF);
ExplodedNodeSet evaluated;
evalBind(evaluated, CNE, Pred, Result, V, true);
- Bldr.takeNodes(Pred);
- Bldr.addNodes(evaluated);
+ Dst.insert(evaluated);
----------------
NagyDonat wrote:
@tigbr I see that you removed the `insert` call. Did you consider adding the `assert` to guard the code that assumes that the `evaluated` set contains exactly one node?
https://github.com/llvm/llvm-project/pull/212186
More information about the cfe-commits
mailing list