[clang] [clang][StaticAnalyzer] Crash on loop unrolling mode (PR #82089)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 23:46:31 PST 2024
================
@@ -226,6 +226,21 @@ static bool isPossiblyEscaped(ExplodedNode *N, const DeclRefExpr *DR) {
return false;
}
}
+
+ if (const SwitchStmt *SS = dyn_cast<SwitchStmt>(S)) {
+ if (const CompoundStmt *CST = dyn_cast<CompoundStmt>(SS->getBody())) {
----------------
steakhal wrote:
```suggestion
if (const auto *SS = dyn_cast<SwitchStmt>(S)) {
if (const auto *CST = dyn_cast<CompoundStmt>(SS->getBody())) {
```
The type is already mentioned on the line.
https://github.com/llvm/llvm-project/pull/82089
More information about the cfe-commits
mailing list