[PATCH] D24905: Fix unreachable code false positive, vardecl in switch

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 04:36:25 PDT 2016


xazax.hun added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp:195
@@ +194,3 @@
+    if (Optional<CFGStmt> S = I->getAs<CFGStmt>()) {
+      if (isa<Expr>(S->getStmt()))
+        return S->getStmt();
----------------
Maybe I would prefer something like !isa<DeclStmt> which is a less intrusive change.


Repository:
  rL LLVM

https://reviews.llvm.org/D24905





More information about the cfe-commits mailing list