================
@@ -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);
   }
----------------
steakhal wrote:

```suggestion
  ExplodedNodeSet PostVisited;
  if (shouldJustCallCheckers(currStmt, PostVisitKind))
    getCheckerManager().runCheckersForPostStmt(PostVisited, Visited, currStmt, 
*this);
  else
    PostVisited.insert(Visited);
```

https://github.com/llvm/llvm-project/pull/218691
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to