2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only %s -verify
|
2008-09-26 08:31:16 +08:00
|
|
|
// Test case for:
|
|
|
|
// <rdar://problem/6248119> @finally doesn't introduce a new scope
|
|
|
|
|
|
|
|
void f0() {
|
|
|
|
int i;
|
|
|
|
@try {
|
|
|
|
} @finally {
|
|
|
|
int i = 0;
|
|
|
|
}
|
|
|
|
}
|
2008-09-27 01:32:47 +08:00
|
|
|
|
|
|
|
void f1() {
|
|
|
|
int i;
|
|
|
|
@try {
|
|
|
|
int i =0;
|
|
|
|
} @finally {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void f2() {
|
|
|
|
int i;
|
|
|
|
@try {
|
|
|
|
} @catch(id e) {
|
|
|
|
int i = 0;
|
|
|
|
}
|
|
|
|
}
|