Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s |
John McCall | f85e193 | 2011-06-15 23:02:42 +0000 | [diff] [blame] | 2 | |
| 3 | void *objc_autoreleasepool_push(); |
| 4 | void autoreleasepool_pop(void*); |
| 5 | |
| 6 | @interface AUTORP @end |
| 7 | |
| 8 | @implementation AUTORP |
| 9 | - (void) unregisterTask:(id) task { |
| 10 | goto L; // expected-error {{goto into protected scope}} |
| 11 | |
| 12 | @autoreleasepool { // expected-note {{jump bypasses auto release push of @autoreleasepool block}} |
| 13 | void *tmp = objc_autoreleasepool_push(); |
| 14 | L: |
| 15 | autoreleasepool_pop(tmp); |
| 16 | @autoreleasepool { |
| 17 | return; |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | @end |
| 22 | |