blob: 631c7b35a992f37f6441a1f37b7c89aa26a4fedf [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only %s -verify
Ted Kremenekaefc3662008-09-26 00:31:16 +00002// Test case for:
3// <rdar://problem/6248119> @finally doesn't introduce a new scope
4
5void f0() {
6 int i;
7 @try {
8 } @finally {
9 int i = 0;
10 }
11}
Ted Kremenek3527b592008-09-26 17:32:47 +000012
13void f1() {
14 int i;
15 @try {
16 int i =0;
17 } @finally {
18 }
19}
20
21void f2() {
22 int i;
23 @try {
24 } @catch(id e) {
25 int i = 0;
26 }
27}