aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/warn-unreachable.mm
blob: bb573b875c569d00c78f453e1bcf2b60208733a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -fsyntax-only -fobjc-exceptions -fcxx-exceptions -verify -Wunreachable-code %s

void f();

void g3() {
  try {
    @try {
      f();
      throw 4; // caught by @catch, not by outer c++ catch.
      f(); // expected-warning {{will never be executed}}
    } @catch (...) {
    }
    f(); // not-unreachable
  } catch (...) {
  }
}