[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 19 02:15:14 PST 2024


================
@@ -226,6 +226,17 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) {
           return false;
       }
     }
+
+    if (const SwitchStmt *SS = dyn_cast<SwitchStmt>(S)) {
+      for (const Stmt *CB : dyn_cast<CompoundStmt>(SS->getBody())->body()) {
+        for (const Decl *D : dyn_cast<DeclStmt>(CB)->decls()) {
----------------
huang-me wrote:

Oh, that's a stupid mistake. Thanks again.

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


More information about the cfe-commits mailing list