2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2011-06-16 07:02:42 +08:00
|
|
|
|
|
|
|
void *objc_autoreleasepool_push();
|
|
|
|
void autoreleasepool_pop(void*);
|
|
|
|
|
|
|
|
@interface AUTORP @end
|
|
|
|
|
|
|
|
@implementation AUTORP
|
|
|
|
- (void) unregisterTask:(id) task {
|
2014-09-06 08:24:58 +08:00
|
|
|
goto L; // expected-error {{cannot jump}}
|
2011-06-16 07:02:42 +08:00
|
|
|
|
|
|
|
@autoreleasepool { // expected-note {{jump bypasses auto release push of @autoreleasepool block}}
|
|
|
|
void *tmp = objc_autoreleasepool_push();
|
|
|
|
L:
|
|
|
|
autoreleasepool_pop(tmp);
|
|
|
|
@autoreleasepool {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|