================
@@ -0,0 +1,12 @@
+// RUN: %clang_analyze_cc1 -verify %s -fcxx-exceptions -fexceptions 
-analyzer-checker=core -analyzer-checker=alpha.deadcode.UnreachableCode
+
+// expected-no-diagnostics
+
+void foo();
+
+void f4() {
+  try {
+    foo();
+  } catch (int) {
+  }
+}
----------------
steakhal wrote:

```suggestion
void fp_90162() {
  try { // no-warning: The TryStmt shouldn't be unreachable.
    foo();
  } catch (int) {
    foo(); // We assume that catch handlers are reachable.
  }
}

```

https://github.com/llvm/llvm-project/pull/91675
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to