2011-02-22 09:52:06 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only %s -verify -fobjc-exceptions
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
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;
|
|
|
|
}
|
|
|
|
}
|