207
|
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))
|
|
18 extern 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
|