================ @@ -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()) { ---------------- NagyDonat wrote:
Be careful, this may cause a crash in standard-compliant but unusual code where the body of a `switch` statement is *not* a compound statement. For example code like ``` switch (get_value()) case 0: case 1: run_foobar(); ``` is completely valid; and here the body of the switch statement is a `CaseStmt` (which has another case statement as a child). https://github.com/llvm/llvm-project/pull/82089 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits