Mike Stump | 04c6851 | 2010-01-21 15:20:48 +0000 | [diff] [blame] | 1 | // RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value |
2 | |||||
3 | int live(); | ||||
4 | int dead(); | ||||
5 | int liveti() throw(int); | ||||
6 | int (*livetip)() throw(int); | ||||
7 | |||||
8 | int test1() { | ||||
9 | try { | ||||
10 | live(); | ||||
11 | } catch (int i) { | ||||
12 | live(); | ||||
13 | } | ||||
14 | return 1; | ||||
15 | } | ||||
16 | |||||
17 | void 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 | } |