/// TODO: statement expressions, for (int x[n]; ;), case.
-/// TODO: check the body of an objc method.
-
-// TODO: Consider wording like: "branching bypasses declaration of
-// variable-length"
-
/// JumpScopeChecker - This object is used by Sema to diagnose invalid jumps
/// into VLA and other protected scopes. For example, this rejects:
} @catch (C *c) { // expected-note {{jump bypasses initialization of @catch block}}
L8: ;
}
-
-
}
void test2(int a) {
blargh: ;
} @catch (...) {}
}
+
+@interface Greeter
++ (void) hello;
+@end
+
+@implementation Greeter
++ (void) hello {
+
+ @try {
+ goto blargh; // expected-error {{illegal goto into protected scope}}
+ } @catch (...) { // expected-note {{jump bypasses initialization of @catch block}}
+ blargh: ;
+ }
+}
+@end