[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
Tue Jul 28 06:42:31 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);
Pred = *evaluated.begin();
State = Pred->getState();
}
}
- State = State->BindExpr(CNE, Pred->getStackFrame(), Result);
- Bldr.generateNode(CNE, Pred, State);
+ Dst.erase(Pred);
----------------
NagyDonat wrote:
```suggestion
```
The only effect of this call is that it cancels out the `Dst.insert(evaluated);` call above it -- you should remove them both.
https://github.com/llvm/llvm-project/pull/212186
More information about the cfe-commits
mailing list