xref: /llvm-project/clang/test/Analysis/unreachable-code-exceptions.cpp (revision 8fe21fda7469f2fdf83980a2720a15baad74ae4f)
1 // RUN: %clang_analyze_cc1 -verify %s -fcxx-exceptions -fexceptions -analyzer-checker=core,alpha.deadcode.UnreachableCode
2 
3 // expected-no-diagnostics
4 
5 void foo();
6 
fp_90162()7 void fp_90162() {
8   try { // no-warning: The TryStmt shouldn't be unreachable.
9     foo();
10   } catch (int) {
11     foo(); // We assume that catch handlers are reachable.
12   }
13 }
14