Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjC / attr-swift_objc_members.m
blob81328b6245947a5793b2a7756f3dae46516de226
1 // RUN: %clang_cc1 -verify -fsyntax-only %s
3 #if !__has_attribute(swift_objc_members)
4 #error cannot verify presence of swift_objc_members attribute
5 #endif
7 __attribute__((__swift_objc_members__))
8 __attribute__((__objc_root_class__))
9 @interface I
10 @end
12 __attribute__((swift_objc_members))
13 @protocol P
14 @end
15 // expected-error@-3 {{'swift_objc_members' attribute only applies to Objective-C interfaces}}
17 __attribute__((swift_objc_members))
18 extern void f(void);
19 // expected-error@-2 {{'swift_objc_members' attribute only applies to Objective-C interfaces}}
21 // expected-error@+1 {{'__swift_objc_members__' attribute takes no arguments}}
22 __attribute__((__swift_objc_members__("J")))
23 @interface J
24 @end