bolt/deps/llvm-18.1.8/clang/test/Sema/warn-unreachable.mm

17 lines
349 B
Text
Raw Normal View History

2025-02-14 19:21:04 +01:00
// 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 (...) {
}
}