Ted Kremenek | aefc366 | 2008-09-26 00:31:16 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only %s -verify |
2 | // Test case for: | ||||
3 | // <rdar://problem/6248119> @finally doesn't introduce a new scope | ||||
4 | |||||
5 | void f0() { | ||||
6 | int i; | ||||
7 | @try { | ||||
8 | } @finally { | ||||
9 | int i = 0; | ||||
10 | } | ||||
11 | } | ||||
Ted Kremenek | 3527b59 | 2008-09-26 17:32:47 +0000 | [diff] [blame] | 12 | |
13 | void f1() { | ||||
14 | int i; | ||||
15 | @try { | ||||
16 | int i =0; | ||||
17 | } @finally { | ||||
18 | } | ||||
19 | } | ||||
20 | |||||
21 | void f2() { | ||||
22 | int i; | ||||
23 | @try { | ||||
24 | } @catch(id e) { | ||||
25 | int i = 0; | ||||
26 | } | ||||
27 | } |