1 // RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
3 __attribute__((deprecated)) @class B; // expected-error {{prefix attribute must be followed by an interface or protocol}}
5 __attribute__((deprecated)) @interface A @end
6 __attribute__((deprecated)) @protocol P0;
7 __attribute__((deprecated)) @protocol P1
10 #define EXP __attribute__((visibility("default")))
12 EXP class C2 {}; // expected-warning {{attribute 'visibility' is ignored, place it after "class" to apply attribute to type declaration}}
14 @interface EXP I @end // expected-error {{postfix attributes are not allowed on Objective-C directives, place them in front of '@interface'}}
15 EXP @interface I2 @end
17 @implementation EXP I @end // expected-error-re {{postfix attributes are not allowed on Objective-C directives{{$}}}}
18 // FIXME: Prefix attribute recovery skips until ';'
19 EXP @implementation I2 @end; // expected-error {{prefix attribute must be followed by an interface or protocol}}
21 @class EXP OC; // expected-error-re {{postfix attributes are not allowed on Objective-C directives{{$}}}}
22 EXP @class OC2; // expected-error {{prefix attribute must be followed by an interface or protocol}}
24 @protocol EXP P @end // expected-error {{postfix attributes are not allowed on Objective-C directives, place them in front of '@protocol'}}