[clang] [NFC][analyzer] Remove class 'NodeBuilder' (PR #217319)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 24 07:02:59 PDT 2026
================
@@ -538,21 +536,35 @@ void CheckerManager::runCheckersForBeginFunction(ExplodedNodeSet &Dst,
expandGraphWithCheckers(C, Dst, Src);
}
-/// Run checkers for end of path.
-// Note, We do not chain the checker output (like in expandGraphWithCheckers)
-// for this callback since end of path nodes are expected to be final.
+/// Run checkers for end of a function (either the entrypoint or another
+/// function that was inlined). Note that this function places the
+/// checker activations on separate execution paths:
+/// /-[checker1]-> N1 ...
+/// Pred --[checker2]-> N2 ...
+/// \-[checker3]-> N3 ...
+/// (If none of the checkers produce a transition, we continue with 'Pred'.)
+///
+/// This differs from the handling of all the other checker callbacks, where
+/// the checker activations are chained sequentially on a single path:
+/// Pred --[checker1]-> N1 --[checker2]-> N2 --[checker3]-> N3 ...
+///
+/// This difference has historical reasons: originally this callback was called
+/// 'EndPath' and only activated at the end of an execution paths, and
+/// (according to an old comment) those 'EndPath' checkers expected that they
+/// create an "end of path" node which will be final.
+/// TODO: Check whether this exceptional behavior is still justified.
void CheckerManager::runCheckersForEndFunction(ExplodedNodeSet &Dst,
ExplodedNode *Pred,
ExprEngine &Eng,
const ReturnStmt *RS) {
----------------
steakhal wrote:
My question is rather, how did we not spot the side-effects of the parallel nodes in the exploded graph when debugging any of the related checkers?
I bet it's easy to see an unjustified split - and I never saw one so far. I've debugged the stack address checker and also MallocChecker many times so I'm still kindof surprised that I haven't seen it misbehave.
https://github.com/llvm/llvm-project/pull/217319
More information about the cfe-commits
mailing list