25 lines · plain
1// RUN: %clang_cc1 -verify -fsyntax-only %s2 3#if !__has_attribute(swift_objc_members)4#error cannot verify presence of swift_objc_members attribute5#endif6 7__attribute__((__swift_objc_members__))8__attribute__((__objc_root_class__))9@interface I10@end11 12__attribute__((swift_objc_members))13@protocol P14@end15// 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 J24@end25