/llvm-project/clang/test/Parser/ |
H A D | attr-external-source-symbol.m | 3 void function(void) __attribute__((external_source_symbol(language="Swift", defined_in="module", ge… function 5 __attribute__((external_source_symbol(language="Swift", defined_in="module"))) function 8 - (void)method __attribute__((external_source_symbol(defined_in= "module"))); method 15 } __attribute__((external_source_symbol(language = "Swift"))); function 17 void functionCustomUSR(void) __attribute__((external_source_symbol(language="Swift", defined_in="mo… function 19 void functionCustomUSR2(void) __attribute__((external_source_symbol(language="Swift", defined_in="m… function 22 __attribute__((external_source_symbol())); // expected-error {{expected 'language', 'defined_in', '… function 24 __attribute__((external_source_symbol(invalid))); // expected-error {{expected 'language', 'defined… function 26 __attribute__((external_source_symbol(language))); // expected-error {{expected '=' after language}} function 28 __attribute__((external_source_symbol(language=))); // expected-error {{expected string literal for… function [all …]
|
H A D | objcbridge-related-attribute.m | 3 typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGC… struct 4 typedef struct __attribute__((objc_bridge_related(NSColor,,CGColor))) CGColor *CGColorRef1Ok; struct 5 typedef struct __attribute__((objc_bridge_related(NSColor,,))) CGColor *CGColorRef2Ok; struct 6 typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,))) CGColor *CGColorRef… struct 8 typedef struct __attribute__((objc_bridge_related(,colorWithCGColor:,CGColor))) CGColor *CGColorRef… struct 9 typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor,CGColor))) CGColor *CGCo… struct 10 typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor::,CGColor))) CGColor *CG… struct 11 typedef struct __attribute__((objc_bridge_related(12,colorWithCGColor:,CGColor))) CGColor *CGColorR… struct 12 typedef struct __attribute__((objc_bridge_related(NSColor,+:,CGColor))) CGColor *CGColorRef5NotOk; … struct 13 typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,+))) CGColor *CGColorRe… struct
|
/llvm-project/clang/test/SemaObjCXX/ |
H A D | attr-trivial-abi.mm | 3 void __attribute__((trivial_abi)) foo(); // expected-warning {{'trivial_abi' attribute only applies… function 9 struct __attribute__((trivial_abi)) S1 { struct 13 struct __attribute__((trivial_abi)) S2 { // expected-warning {{'trivial_abi' cannot be applied to '… struct 17 struct __attribute__((trivial_abi)) S3 { // expected-warning {{'trivial_abi' cannot be applied to '… struct 23 } __attribute__((trivial_abi)); // expected-warning {{'trivial_abi' cannot be applied to 'S3_2'}} e… function 29 struct __attribute__((trivial_abi)) S5 : public virtual S4 { // expected-warning {{'trivial_abi' ca… struct 32 struct __attribute__((trivial_abi)) S9 : public S4 { struct 39 struct __attribute__((trivial_abi)) S12 { // expected-warning {{'trivial_abi' cannot be applied to … function 43 struct __attribute__((trivial_abi)) S13 { // expected-warning {{'trivial_abi' cannot be applied to … struct 47 struct __attribute__((trivial_abi)) S7 { // expected-warning {{'trivial_abi' cannot be applied to '… struct [all …]
|
/llvm-project/clang/test/Sema/ |
H A D | attr-enforce-tcb-errors.m | 5 __attribute__((objc_root_class)) function 7 - (void)bothTCBAndTCBLeafOnSeparateRedeclarations __attribute__((enforce_tcb("x"))); // expected-no… method 9 - (void)bothTCBAndTCBLeafOnSeparateRedeclarationsOppositeOrder __attribute__((enforce_tcb_leaf("x")… method 11 - (void)bothTCBAndTCBLeafButDifferentIdentifiersOnSeparateRedeclarations __attribute__((enforce_tcb… method 13 - (void)bothTCBAndTCBLeafButDifferentIdentifiersOnSeparateRedeclarationsOppositeOrder __attribute__… method 15 - (void)onInterfaceOnly __attribute__((enforce_tcb("test"))); method 19 - (void)noArguments __attribute__((enforce_tcb)); // expected-error{{'enforce_tcb' attribute takes … method in NoImplementation 21 - (void)tooManyArguments __attribute__((enforce_tcb("test", 12))); // expected-error{{'enforce_tcb'… method in NoImplementation 23 - (void)wrongArgumentType __attribute__((enforce_tcb(12))); // expected-error{{expected string lite… method in NoImplementation 25 - (void)noArgumentsLeaf __attribute__((enforce_tcb_leaf)); // expected-error{{'enforce_tcb_leaf' at… method in NoImplementation [all …]
|
/llvm-project/clang/test/Index/ |
H A D | index-attrs.m | 7 -(id)prop __attribute__((annotate("anno"))); method 9 @property (assign) id prop __attribute__((annotate("anno"))); property 12 __attribute__((objc_protocol_requires_explicit_implementation)) function 17 id __attribute__((objc_precise_lifetime)) x; function 18 struct __attribute__((objc_boxable)) S { struct 22 __attribute__((objc_exception)) function 23 __attribute__((objc_root_class)) function 24 __attribute__((objc_subclassing_restricted)) function 25 __attribute__((objc_runtime_visible)) function 27 -(id)a __attribute__((ns_returns_retained)); method [all …]
|
H A D | availability.mm | 1 __attribute__((availability(macosx, introduced = 8.0))) function 4 int i1 __attribute__((availability(macosx, introduced = 9.0))); field 7 @property int p1 __attribute__((availability(macosx, introduced=9.0))); property 9 - (void)m1 __attribute__((availability(macosx, introduced = 9.0))); method 19 __attribute__((availability(macosx, introduced = 10.0))) function 22 @property int p3 __attribute__((availability(macosx, introduced=11.0))); property 24 - (void)m3 __attribute__((availability(macosx, introduced = 11.0))); method in Cat 34 __attribute__((availability(macosx, introduced = 10.0))) function 37 @property int p5 __attribute__((availability(macosx, introduced=11.0))); property 39 - (void)m5 __attribute__((availability(macosx, introduced = 11.0))); method
|
/llvm-project/clang/test/SemaObjC/ |
H A D | attr-swift-error.m | 11 typedef struct __attribute__((__objc_bridge__(NSError))) __CFError *CFErrorRef; struct 13 extern int f0(void) __attribute__((__swift_error__)); function 15 extern int f1(void) __attribute__((__swift_error__(invalid))); function 17 extern int f2(void) __attribute__((__swift_error__(none,zero_result))); function 45 - (instancetype)o0 __attribute__((__swift_error__(none))); method 46 - (instancetype)o1 __attribute__((__swift_error__(nonnull_error))); method 48 - (instancetype)o2 __attribute__((__swift_error__(null_result))); method 50 - (instancetype)o3 __attribute__((__swift_error__(nonzero_result))); method 52 - (instancetype)o4 __attribute__((__swift_error__(zero_result))); method 56 extern BOOL m0(CFErrorRef *) __attribute__((__swift_error__(none))); function [all …]
|
H A D | override-opt-prop-availability.m | 5 @property (nonatomic) int reqProp __attribute__((availability(ios, introduced=12.0))); // expected-… property 10 @property (nonatomic) int myProp __attribute__((availability(ios, introduced=12.0))); // expected-n… property 13 @property (nonatomic, readonly) int depProp __attribute__((availability(ios, introduced=8.0, deprec… property 16 @property (nonatomic) int obsProp __attribute__((availability(ios, introduced=8.0, obsoleted=12.0))… property 19 - (void) unavaibleInClass __attribute__((availability(ios, introduced=12.0))); // expected-note {{m… method 25 @property (nonatomic) int myProp __attribute__((availability(ios, introduced=13.0))); // expected-n… property 27 @property (nonatomic) int reqProp __attribute__((availability(ios, introduced=13.0))); // expected-… property 29 @property (nonatomic, readonly) int depProp __attribute__((availability(ios, introduced=8.0, deprec… property 31 @property (nonatomic) int obsProp __attribute__((availability(ios, introduced=8.0, obsoleted=10.0))… property 33 - (void) unavaibleInClass __attribute__((availability(ios, unavailable))); // expected-warning {{me… method
|
H A D | attr-swift_private.m | 3 __attribute__((__swift_private__)) function 7 __attribute__((__swift_private__)) function 12 @property id property __attribute__((__swift_private__)); property 13 - (void)instanceMethod __attribute__((__swift_private__)); method 14 + (void)classMethod __attribute__((__swift_private__)); class 17 void f(void) __attribute__((__swift_private__)); function 19 struct __attribute__((__swift_private__)) S {}; struct 21 enum __attribute__((__swift_private__)) E { function 28 void g(void) __attribute__((__swift_private__("private"))); function
|
H A D | attr-availability.m | 5 - (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expe… method 10 - (void)partial_proto_method __attribute__((availability(macosx,introduced=10.8))); method in WARN_PARTIAL 14 - (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-n… method 18 - (void)partialMethod __attribute__((availability(macosx,introduced=10.8))); method in WARN_PARTIAL 20 - (void)overridden __attribute__((availability(macosx,introduced=10.3))); // expected-note{{overrid… method in WARN_PARTIAL 21 - (void)overridden2 __attribute__((availability(macosx,introduced=10.3))); method in WARN_PARTIAL 22 - (void)overridden3 __attribute__((availability(macosx,deprecated=10.3))); method in WARN_PARTIAL 23 - (void)overridden4 __attribute__((availability(macosx,deprecated=10.3))); // expected-note{{overri… method in WARN_PARTIAL 24 - (void)overridden5 __attribute__((availability(macosx,unavailable))); method in WARN_PARTIAL 25 - (void)overridden6 __attribute__((availability(macosx,introduced=10.3))); // expected-note{{overri… method in WARN_PARTIAL [all …]
|
H A D | attr-availability-1.m | 10 - (void)proto_method __attribute__((availability(macosx,introduced=10_1,deprecated=10_2))); // expe… method 14 - (void)method __attribute__((availability(macosx,introduced=10_1,deprecated=10_2))); // expected-n… method 16 - (void)overridden __attribute__((availability(macosx,introduced=10_3))); // expected-note{{overrid… method 17 - (void)overridden2 __attribute__((availability(macosx,introduced=10_3))); method 18 - (void)overridden3 __attribute__((availability(macosx,deprecated=10_3))); method 19 - (void)overridden4 __attribute__((availability(macosx,deprecated=10_3))); // expected-note{{overri… method 20 - (void)overridden5 __attribute__((availability(macosx,unavailable))); method 21 - (void)overridden6 __attribute__((availability(macosx,introduced=10_3))); // expected-note{{overri… method 26 - (void)overridden __attribute__((availability(macosx,introduced=10_4))); // expected-warning{{over… method 27 - (void)overridden2 __attribute__((availability(macosx,introduced=10_2))); method [all …]
|
H A D | special-dep-unavail-warning.m | 5 - (void) unavailMeth __attribute__((unavailable)); // expected-note {{has been explicitly marked un… method 6 - (void) depInA1 __attribute__((deprecated)); // expected-note {{'depInA1' has been explicitly mark… method 8 - (void) depInA2 __attribute__((deprecated)); // expected-note {{'depInA2' has been explicitly mark… method 9 - (void) unavailMeth2 __attribute__((unavailable)); // expected-note {{has been explicitly marked u… method 11 - (void) depunavailInA1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note … method 12 - (void)FuzzyMeth __attribute__((deprecated)); // expected-note {{'FuzzyMeth' has been explicitly m… method 13 - (void)FuzzyMeth1 __attribute__((unavailable)); method 17 - (void) unavailMeth1 __attribute__((unavailable)); // expected-note {{has been explicitly marked u… method 18 - (void) depInA __attribute__((deprecated)); // expected-note {{'depInA' has been explicitly marked… method 19 - (void) depInA2 __attribute__((deprecated)); method [all …]
|
H A D | attr-availability-priority.m | 3 void explicit(void) __attribute__((availability(tvos, introduced=11.0, deprecated=12.0))); // expec… function 4 void inferred(void) __attribute__((availability(ios, introduced=11.0, deprecated=12.0))); // expect… function 6 __attribute__((availability(ios, introduced=11.0, deprecated=12.0))) function 7 __attribute__((availability(tvos, introduced=11.0))); function 9 __attribute__((availability(tvos, introduced=11.0))) function 10 __attribute__((availability(ios, introduced=11.0, deprecated=12.0))); function 23 void explicitWinsOverExplicitFromPragma(void) __attribute__((availability(tvos, introduced=11.0))); function 24 void implicitLosesOverExplicitFromPragma(void) __attribute__((availability(ios, introduced=11.0)));… function 31 void explicitWinsOverImplicitFromPragma(void) __attribute__((availability(tvos, introduced=11.0))); function 32 void implicitWinsOverImplicitFromPragma(void) __attribute__((availability(ios, introduced=11.0))); function
|
H A D | attr-swift_bridge.m | 4 __attribute__((__swift_bridge__)) function 9 __attribute__((__swift_bridge__(1))) function 14 __attribute__((__swift_bridge__("K", 1))) function 20 - (void)method __attribute__((__swift_bridge__("method"))); method 23 __attribute__((__swift_bridge__("Array"))) function 27 __attribute__((__swift_bridge__("ProtocolP"))) function 33 struct __attribute__((__swift_bridge__("StructT"))) T {}; struct 36 struct __attribute__((swift_bridge("foo"), swift_bridge("foo"))) S; struct 38 struct __attribute__((swift_bridge("foo"), swift_bridge("bar"))) S; // expected-warning {{attribute… struct
|
H A D | method-direct.m | 9 - (void)protoMethod __attribute__((objc_direct)); // expected-error {{'objc_direct' attribute … method 10 + (void)classProtoMethod __attribute__((objc_direct)); // expected-error {{'objc_direct' attribute … class 13 __attribute__((objc_root_class)) function 18 - (void)rootDirect __attribute__((objc_direct)); // expected-note {{previous declaration is he… method 19 + (void)classRootDirect __attribute__((objc_direct)); // expected-note {{previous declaration is he… class 20 - (void)otherRootDirect __attribute__((objc_direct)); // expected-note {{direct method 'otherRootDi… method 21 + (void)otherClassRootDirect __attribute__((objc_direct)); // expected-note {{direct method 'otherC… class 22 + (void)otherOtherClassRootDirect __attribute__((objc_direct)); // expected-note {{direct method 'o… class 27 __attribute__((objc_direct_members)) function 33 __attribute__((objc_direct_members)) function [all …]
|
H A D | nonnull.m | 9 int f2(int *x) __attribute__ ((nonnull (1))); function 10 int f3(int *x) __attribute__ ((nonnull (0))); // expected-error {{'nonnull' attribute parameter 1 i… function 11 int f4(int *x, int *y) __attribute__ ((nonnull (1,2))); function 12 int f5(int *x, int *y) __attribute__ ((nonnull (2,1))); function 13 int f6(NSObject *x) __attribute__ ((nonnull (1))); // no-warning function 14 int f7(NSObject *x) __attribute__ ((nonnull)); // no-warning function 17 extern void func1 (void (^block1)(), void (^block2)(), int) __attribute__((nonnull)); function 20 __attribute__((nonnull(1,3))); function 22 extern void func4 (void (^block1)(), void (^block2)()) __attribute__((nonnull(1))) function 23 __attribute__((nonnull(2))); function [all …]
|
H A D | format-arg-attribute.m | 17 extern NSString *fa2 (const NSString *) __attribute__((format_arg(1))); function 18 extern NSString *fa3 (NSString *) __attribute__((format_arg(1))); function 20 extern void fc1 (const NSString *) __attribute__((format_arg)); // expected-error {{'format_arg' a… function 21 extern void fc2 (const NSString *) __attribute__((format_arg())); // expected-error {{'format_arg' … function 22 extern void fc3 (const NSString *) __attribute__((format_arg(1, 2))); // expected-error {{'format_a… function 24 struct s1 { int i; } __attribute__((format_arg(1))); // expected-warning {{'format_arg' attribute … function 25 union u1 { int i; } __attribute__((format_arg(1))); // expected-warning {{'format_arg' attribute o… function 26 enum e1 { E1V0 } __attribute__((format_arg(1))); // expected-warning {{'format_arg' attribute only … function 28 extern NSString *ff3 (const NSString *) __attribute__((format_arg(3-2))); function 29 extern NSString *ff4 (const NSString *) __attribute__((format_arg(foo))); // expected-error {{use o… function [all …]
|
H A D | attr-objc-non-lazy.m | 3 __attribute__((objc_nonlazy_class)) function 9 __attribute__((objc_nonlazy_class)) int X; // expected-error {{'objc_nonlazy_class' attribute only … function 11 __attribute__((objc_nonlazy_class())) function 17 __attribute__((objc_nonlazy_class("foo"))) // expected-error{{'objc_nonlazy_class' attribute takes … function 23 __attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies… function 27 __attribute__((objc_nonlazy_class)) // expected-error {{'objc_nonlazy_class' attribute only applies… function 33 __attribute__((objc_nonlazy_class)) function 37 __attribute__((objc_nonlazy_class)) function
|
H A D | objc-asm-attribute-neg-test.m | 3 __attribute__((objc_runtime_name)) // expected-error {{'objc_runtime_name' attribute takes one argu… function 7 __attribute__((objc_runtime_name(123))) // expected-error {{expected string literal as argument of … function 11 __attribute__((objc_runtime_name("MySecretNamespace.Protocol"))) function 15 __attribute__((objc_runtime_name("MySecretNamespace.Message"))) function 23 - (int) getMyProperty __attribute__((objc_runtime_name("MySecretNamespace.Message"))); // expected-… method in int 29 __attribute__((objc_runtime_name("MySecretNamespace.ForwardClass"))) function 32 __attribute__((objc_runtime_name("MySecretNamespace.ForwardProtocol"))) function 37 - (id) MyMethod __attribute__((objc_runtime_name("MySecretNamespace.Message"))) { method 48 __attribute__((objc_runtime_name("MySecretNamespace.Message"))) function
|
H A D | attr-swift_objc_members.m | 7 __attribute__((__swift_objc_members__)) function 8 __attribute__((__objc_root_class__)) function 12 __attribute__((swift_objc_members)) function 17 __attribute__((swift_objc_members)) function 22 __attribute__((__swift_objc_members__("J"))) function
|
H A D | subclassing-restricted-attr.m | 4 __attribute__((objc_subclassing_restricted)) function 8 __attribute__((objc_subclassing_restricted)) function 16 __attribute__((objc_root_class)) function 20 __attribute__((objc_subclassing_restricted)) function 24 __attribute__((objc_subclassing_restricted)) function 30 __attribute__((objc_subclassing_restricted)) function
|
H A D | method-direct-one-definition.m | 3 __attribute__((objc_root_class)) function 8 - (void)A_Cat __attribute__((objc_direct)); // expected-note {{previous declaration is here}} method in Cat 16 __attribute__((objc_root_class)) function 18 - (void)B_primary __attribute__((objc_direct)); // expected-note {{previous declaration is here}} method 26 - (void)B_Cat __attribute__((objc_direct)); method in Cat 30 - (void)B_OtherCat __attribute__((objc_direct)); // expected-note {{previous declaration is here}} method in OtherCat 38 - (void)B_implOnly __attribute__((objc_direct)) { // expected-note {{previous declaration is here}} method 51 - (void)B_implOnly __attribute__((objc_direct)) { // expected-error {{direct method declaration con… method in Cat 55 __attribute__((objc_root_class)) function 57 - (void)C1 __attribute__((objc_direct)); // expected-note {{previous declaration is here}} method [all …]
|
H A D | format-ostrace-warning.m | 19 …torRef alloc, CFDictionaryRef formatOptions, const char* format, ...) __attribute__((format(os_tra… function 22 …CFDictionaryRef formatOptions, const char* format, va_list arguments) __attribute__((format(os_tra… function 25 …ef theString, CFDictionaryRef formatOptions, const char* format, ...) __attribute__((format(os_tra… function 28 …CFDictionaryRef formatOptions, const char* format, va_list arguments) __attribute__((format(os_tra… function 38 extern void MyOSLog(const char* format, ...) __attribute__((format(os_trace, 1, 2))); function 39 extern void MyFStringCreateWithFormat(const char *format, ...) __attribute__((format(os_trace, 1, 2… function 40 extern void XMyOSLog(int, const char* format, ...) __attribute__((format(os_trace, 2, 3))); function 41 extern void os_trace(const char *format, ...) __attribute__((format(os_trace, 1, 2))); function
|
/llvm-project/clang/test/CodeGenObjC/ |
H A D | direct-method.m | 12 __attribute__((objc_root_class)) function 14 - (int)getInt __attribute__((objc_direct)); method 27 - (int)getInt __attribute__((objc_direct)) { method 57 + (int)classGetInt __attribute__((objc_direct)) { class 75 - (struct my_complex_struct)getComplex __attribute__((objc_direct)) { method 106 + (struct my_complex_struct)classGetComplex __attribute__((objc_direct)) { class 113 - (struct my_aggregate_struct)getAggregate __attribute__((objc_direct)) { method 143 + (struct my_aggregate_struct)classGetAggregate __attribute__((objc_direct)) { class 150 - (void)accessCmd __attribute__((objc_direct)) { method 183 - (int)directMethodInExtension __attribute__((objc_direct)); method in nonatomic [all …]
|
H A D | deadcode_strip_used_var.m | 7 __attribute__((used)) static int XXXXXX __attribute__ ((section ("__DATA,__Xinterpose"))) ; function 8 __attribute__((used)) static int YYYY __attribute__ ((section ("__DATA,__Xinterpose"))) ; function
|