blob: 13a82f4f183ed8a9ab2f924715cd9f65955264d8 [file] [log] [blame]
Mike Stump04c68512010-01-21 15:20:48 +00001// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value
2
3int live();
4int dead();
5int liveti() throw(int);
6int (*livetip)() throw(int);
7
8int test1() {
9 try {
10 live();
11 } catch (int i) {
12 live();
13 }
14 return 1;
15}
16
17void test2() {
18 try {
19 live();
20 } catch (int i) {
21 live();
22 }
23 try {
24 liveti();
25 } catch (int i) {
26 live();
27 }
28 try {
29 livetip();
30 } catch (int i) {
31 live();
32 }
33 throw 1;
34 dead(); // expected-warning {{will never be executed}}
35}