1// RUN: %clang_cc1 -verify -fsyntax-only %s 2 3#if !__has_attribute(swift_objc_members) 4#error cannot verify presence of swift_objc_members attribute 5#endif 6 7__attribute__((__swift_objc_members__)) 8__attribute__((__objc_root_class__)) 9@interface I 10@end 11 12__attribute__((swift_objc_members)) 13@protocol P 14@end 15// expected-error@-3 {{'swift_objc_members' attribute only applies to Objective-C interfaces}} 16 17__attribute__((swift_objc_members)) 18extern void f(void); 19// expected-error@-2 {{'swift_objc_members' attribute only applies to Objective-C interfaces}} 20 21// expected-error@+1 {{'__swift_objc_members__' attribute takes no arguments}} 22__attribute__((__swift_objc_members__("J"))) 23@interface J 24@end 25