xref: /llvm-project/clang/test/Sema/warn-unreachable.mm (revision 04f30795f1663843b219393040946136786aa591)
1// RUN: %clang_cc1 -fsyntax-only -fobjc-exceptions -fcxx-exceptions -verify -Wunreachable-code %s
2
3void f();
4
5void g3() {
6  try {
7    @try {
8      f();
9      throw 4; // caught by @catch, not by outer c++ catch.
10      f(); // expected-warning {{will never be executed}}
11    } @catch (...) {
12    }
13    f(); // not-unreachable
14  } catch (...) {
15  }
16}
17