[clang] [NFC][analyzer] Cleanup checker calls in `ExprEngine::ProcessStmt`, `ExprEngine::Visit*` (PR #218691)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 9 01:50:46 PDT 2026
================
@@ -1115,17 +1258,35 @@ void ExprEngine::ProcessStmt(const Stmt *currStmt, ExplodedNode *Pred) {
} else
CleanedStates.insert(Pred);
- // Visit the statement.
- ExplodedNodeSet Dst;
+ ExplodedNodeSet PreVisited;
for (const auto I : CleanedStates) {
- ExplodedNodeSet DstI;
- // Visit the statement.
- Visit(currStmt, I, DstI);
- Dst.insert(DstI);
+ ExplodedNodeSet Tmp;
+ if (shouldJustCallCheckers(currStmt, PreVisitKind)) {
+ getCheckerManager().runCheckersForPreStmt(Tmp, I, currStmt, *this);
+ PreVisited.insert(Tmp);
+ } else
+ PreVisited.insert(I);
+ }
+
+ ExplodedNodeSet Visited;
+ for (const auto I : PreVisited) {
+ ExplodedNodeSet Tmp;
+ Visit(currStmt, I, Tmp);
+ Visited.insert(Tmp);
+ }
+
+ ExplodedNodeSet PostVisited;
+ for (const auto I : Visited) {
+ ExplodedNodeSet Tmp;
+ if (shouldJustCallCheckers(currStmt, PostVisitKind)) {
+ getCheckerManager().runCheckersForPostStmt(Tmp, I, currStmt, *this);
+ PostVisited.insert(Tmp);
+ } else
+ PostVisited.insert(I);
}
----------------
NagyDonat wrote:
I'm marking this as resolved, because I can objectively confirm that the change was applied; and I know that you (steakhal) are not available for some time.
https://github.com/llvm/llvm-project/pull/218691
More information about the cfe-commits
mailing list