[clang] Run PreStmt/PostStmt checker for GCCAsmStmt (PR #95409)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 00:34:59 PDT 2024


================
@@ -2057,11 +2057,16 @@ void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred,
       llvm_unreachable("Support for MatrixSubscriptExpr is not implemented.");
       break;
 
-    case Stmt::GCCAsmStmtClass:
+    case Stmt::GCCAsmStmtClass: {
       Bldr.takeNodes(Pred);
-      VisitGCCAsmStmt(cast<GCCAsmStmt>(S), Pred, Dst);
+      ExplodedNodeSet PreVisit;
+      getCheckerManager().runCheckersForPreStmt(PreVisit, Pred, S, *this);
+      ExplodedNodeSet PostVisit;
+      for (ExplodedNode *const N : PreVisit)
+        VisitGCCAsmStmt(cast<GCCAsmStmt>(S), N, PostVisit);
+      getCheckerManager().runCheckersForPostStmt(Dst, PostVisit, S, *this);
       Bldr.addNodes(Dst);
-      break;
+    } break;
----------------
steakhal wrote:

Hm, I think it would look better if the break was inside the braces.

https://github.com/llvm/llvm-project/pull/95409


More information about the cfe-commits mailing list