[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaObjC / autoreleasepool.m
blob5e4627330e98e19fdac2b182d975d21d6dd48781
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
3 void *objc_autoreleasepool_push(void);
4 void autoreleasepool_pop(void*);
6 @interface AUTORP @end
8 @implementation AUTORP
9 - (void) unregisterTask:(id) task {
10   goto L;       // expected-error {{cannot jump}}
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   }
21 @end