1 // RUN: %clang -target x86_64-apple-darwin -fsyntax-only -Xclang -verify %s
2 // RUN: %clang -target x86_64-apple-darwin -x objective-c++ -fsyntax-only -Xclang -verify %s
7 __attribute__((objc_class_stub))
8 @interface MissingSubclassingRestrictedAttribute : NSObject // expected-error {{'objc_class_stub' attribute cannot be specified on a class that does not have the 'objc_subclassing_restricted' attribute}}
11 __attribute__((objc_class_stub))
12 __attribute__((objc_subclassing_restricted))
13 @interface ValidClassStubAttribute : NSObject
16 @implementation ValidClassStubAttribute // expected-error {{cannot declare implementation of a class declared with the 'objc_class_stub' attribute}}
19 @implementation ValidClassStubAttribute (MyCategory)
22 __attribute__((objc_class_stub(123))) // expected-error {{'objc_class_stub' attribute takes no arguments}}
23 @interface InvalidClassStubAttribute : NSObject
26 __attribute__((objc_class_stub)) // expected-error {{'objc_class_stub' attribute only applies to Objective-C interfaces}}
27 int cannotHaveObjCClassStubAttribute(void) {}