| /llvm-project-15.0.7/clang/test/Sema/ |
| H A D | attr-long-call.c | 9 __attribute((long_call)) int a; // expected-warning {{attribute only applies to functions}} 10 __attribute((short_call)) int d; // expected-warning {{attribute only applies to functions}} 11 __attribute((far)) int a; // expected-warning {{attribute only applies to functions}} 12 __attribute((near)) int a; // expected-warning {{attribute only applies to functions}} 14 __attribute((long_call)) void foo4(void); 15 __attribute((short_call)) void foo10(void); 16 __attribute((far)) void foo5(void); 17 __attribute((near)) void foo6(void); 19 __attribute((long_call, far)) void foo7(void); 20 __attribute((short_call, near)) void foo11(void); [all …]
|
| H A D | attr-uninitialized.c | 4 int dont_initialize_me __attribute((uninitialized)); in good() 8 …int im_bad __attribute((uninitialized("zero"))); // expected-error {{'uninitialized' attribute ta… in bad() 9 …static int im_baaad __attribute((uninitialized)); // expected-warning {{'uninitialized' attribute … in bad() 12 extern int come_on __attribute((uninitialized)); // expected-warning {{'uninitia… 13 int you_know __attribute((uninitialized)); // expected-warning {{'uninitia… 14 static int and_the_whole_world_has_to __attribute((uninitialized)); // expected-warning {{'uninitia… 16 void answer_right_now(void) __attribute((uninitialized)) {} // expected-warn… in answer_right_now() 17 void just_to_tell_you_once_again(__attribute((uninitialized)) int whos_bad) {} // expected-warning … in just_to_tell_you_once_again() 20 …__attribute((uninitialized)) int youre_doin_wrong; // expected-warning {{'uninitialized' attribute… 21 } __attribute((uninitialized)); // expected-warning {{'uninitialized' attribut…
|
| H A D | attr-malloc.c | 7 void * malloc(size_t) __attribute((malloc)); 9 int no_vars __attribute((malloc)); // expected-warning {{attribute only applies to functions}} 11 void returns_void (void) __attribute((malloc)); // expected-warning {{attribute only applies to r… 12 int returns_int (void) __attribute((malloc)); // expected-warning {{attribute only applies to r… 13 int * returns_intptr(void) __attribute((malloc)); // no-warning 15 iptr returns_iptr (void) __attribute((malloc)); // no-warning 17 __attribute((malloc)) void *(*f)(void); // expected-warning{{attribute only applies to functions}} 18 __attribute((malloc)) int (*g)(void); // expected-warning{{attribute only applies to functions}} 20 __attribute((malloc)) 24 #define malloc_like __attribute((__malloc__))
|
| H A D | attr-mode.c | 18 typedef int i16_1 __attribute((mode(HI))); typedef 20 typedef int i16_2 __attribute((__mode__(__HI__))); typedef 23 typedef float f64 __attribute((mode(DF))); typedef 33 typedef unsigned unwind_word __attribute((mode(unwind_word))); typedef 35 int **__attribute((mode(QI)))* i32; // expected-error{{mode attribute}} 40 typedef _Complex float c16a __attribute((mode(HC))); typedef 42 typedef _Complex double c16b __attribute((mode(HC))); typedef 45 typedef _Complex double c32 __attribute((mode(SC))); typedef 47 typedef _Complex float c64 __attribute((mode(DC))); typedef 50 typedef _Complex float c80 __attribute((mode(XC))); typedef [all …]
|
| H A D | alias-redefinition.c | 4 void fun0(void) __attribute((alias("f0"))); 8 void fun1(void) __attribute((alias("f1"))); // expected-error {{redefinition of 'fun1'}} 11 void fun2(void) __attribute((alias("f2"))); // expected-note {{previous definition}} 15 void fun3(void) __attribute((alias("f3"))); // expected-note {{previous definition}} 16 void fun3(void) __attribute((alias("f3"))); // expected-error {{redefinition of 'fun3'}} 19 void fun4(void) __attribute((alias("f4"))); 23 void __attribute((alias("f5"))) fun5(void) {} // expected-error {{definition 'fun5' cannot also be … in fun5() 25 int var1 __attribute((alias("v1"))); // expected-error {{definition 'var1' cannot also be an alias}} 26 static int var2 __attribute((alias("v2"))) = 2; // expected-error {{definition 'var2' cannot also b…
|
| H A D | attr-cleanup.c | 5 extern int g1 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute only applies to… 6 int g2 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute only applies to local … 7 static int g3 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute only applies to… 11 int v1 __attribute((cleanup)); // expected-error {{'cleanup' attribute takes one argument}} in t1() 12 … int v2 __attribute((cleanup(1, 2))); // expected-error {{'cleanup' attribute takes one argument}} in t1() 14 …static int v3 __attribute((cleanup(c1))); // expected-warning {{'cleanup' attribute only applies t… in t1() 16 int v4 __attribute((cleanup(h))); // expected-error {{use of undeclared identifier 'h'}} in t1() 18 int v5 __attribute((cleanup(c1))); in t1() 19 … int v6 __attribute((cleanup(v3))); // expected-error {{'cleanup' argument 'v3' is not a function}} in t1() 38 __attribute((cleanup(c4))) void* g; in t4()
|
| H A D | attr-tls_model.c | 7 int f(void) __attribute((tls_model("global-dynamic"))); // expected-error {{'tls_model' attribute o… 9 int x __attribute((tls_model("global-dynamic"))); // expected-error {{'tls_model' attribute only ap… 10 static __thread int y __attribute((tls_model("global-dynamic"))); // no-warning 12 static __thread int y __attribute((tls_model("local", "dynamic"))); // expected-error {{'tls_model'… 13 static __thread int y __attribute((tls_model(123))); // expected-error {{'tls_model' attribute requ… 14 static __thread int y __attribute((tls_model("foobar"))); // expected-error {{tls_model must be "gl…
|
| H A D | attr-regparm.c | 3 __attribute((regparm(2))) int x0(void); 4 __attribute((regparm(1.0))) int x1(void); // expected-error{{'regparm' attribute requires an intege… 5 __attribute((regparm(-1))) int x2(void); // expected-error{{'regparm' parameter must be between 0 a… 6 __attribute((regparm(5))) int x3(void); // expected-error{{'regparm' parameter must be between 0 an… 7 __attribute((regparm(5,3))) int x4(void); // expected-error{{'regparm' attribute takes one argument…
|
| H A D | aix-attr-tls_model.c | 8 static __thread int y __attribute((tls_model("global-dynamic"))); // no-warning 9 static __thread int y __attribute((tls_model("local-dynamic"))); // expected-error {{TLS model 'loc… 10 static __thread int y __attribute((tls_model("initial-exec"))); // expected-error {{TLS model 'init… 11 static __thread int y __attribute((tls_model("local-exec"))); // expected-error {{TLS model 'local-…
|
| H A D | attr-micromips.c | 6 __attribute((nomicromips)) int a; // expected-error {{attribute only applies to functions}} 7 __attribute((micromips)) int b; // expected-error {{attribute only applies to functions}} 14 __attribute((micromips)) void foo7(void); 15 __attribute((nomicromips)) void foo8(void);
|
| H A D | pragma-weak.c | 5 void both3(void) __attribute((alias("__both3"))); // expected-error {{redefinition of 'both3'}} 8 void __a3(void) __attribute((noinline)); 10 void a3(void) __attribute((alias("__a3"))); // expected-error {{redefinition of 'a3'}}
|
| /llvm-project-15.0.7/clang/test/CodeGen/ |
| H A D | annotations-global.c | 10 static __attribute((annotate("sfoo_0"))) __attribute((annotate("sfoo_1"))) char sfoo; 11 __attribute((annotate("foo_0"))) __attribute((annotate("foo_1"))) char foo; 13 void __attribute((annotate("ann_a_0"))) __attribute((annotate("ann_a_1"))) __attribute((annotate("a… 14 void __attribute((annotate("ann_a_0"))) __attribute((annotate("ann_a_1"))) a(char *a) { in a() 19 __attribute((address_space(1))) __attribute__((annotate("addrspace1_ann"))) char addrspace1_var;
|
| H A D | aarch64-attr-mode-complex.c | 3 typedef _Complex float c16a __attribute((mode(HC))); typedef 4 typedef _Complex double c16b __attribute((mode(HC))); typedef 5 typedef _Complex float c32a __attribute((mode(SC))); typedef 6 typedef _Complex double c32b __attribute((mode(SC))); typedef 7 typedef _Complex float c64a __attribute((mode(DC))); typedef 8 typedef _Complex double c64b __attribute((mode(DC))); typedef
|
| H A D | aarch64-attr-mode-float.c | 3 typedef float f16a __attribute((mode(HF))); typedef 4 typedef double f16b __attribute((mode(HF))); typedef 5 typedef float f32a __attribute((mode(SF))); typedef 6 typedef double f32b __attribute((mode(SF))); typedef 7 typedef float f64a __attribute((mode(DF))); typedef 8 typedef double f64b __attribute((mode(DF))); typedef
|
| H A D | pragma-weak.c | 91 void __declfirstattr(void) __attribute((noinline)); 102 __attribute((weak)) void mix(void) { } in mix() 108 void __mix2(void) __attribute((noinline)); 109 void __mix2(void) __attribute((noinline)); 117 void both(void) __attribute((alias("__both"))); 127 void both2(void) __attribute((alias("__both2"))); // first, wins 134 void __a1(void) __attribute((noinline)); 140 __attribute((pure,noinline,const)) void __xxx(void) { } in __xxx()
|
| /llvm-project-15.0.7/clang/test/Modules/ |
| H A D | odr_hash-vector.cpp | 39 __attribute((vector_size(8))) int x; 42 __attribute((vector_size(8))) int x; 45 __attribute((vector_size(16))) int x; 48 __attribute((vector_size(8))) int x1; 49 __attribute((vector_size(16))) int x2; 51 __attribute((vector_size(16))) long x4; 57 __attribute((vector_size(16))) int x; 60 __attribute((vector_size(8))) unsigned x; 66 __attribute((vector_size(8))) int x1; 67 __attribute((vector_size(16))) int x2; [all …]
|
| /llvm-project-15.0.7/clang/test/SemaObjC/ |
| H A D | arc-nsconsumed-errors.m | 6 typedef void (^blk)(id arg1, __attribute((ns_consumed)) id arg2); 7 typedef void (^blk1)(__attribute((ns_consumed))id arg1, __attribute((ns_consumed)) id arg2); 8 blk a = ^void (__attribute((ns_consumed)) id arg1, __attribute((ns_consumed)) id arg2){}; // expect… 10 blk b = ^void (id arg1, __attribute((ns_consumed)) id arg2){}; 12 blk c = ^void (__attribute((ns_consumed)) id arg1, __attribute((ns_consumed)) id arg2){}; // expect… 16 blk1 a1 = ^void (__attribute((ns_consumed)) id arg1, id arg2){}; // expected-error {{incompatible b… 18 blk1 b2 = ^void (id arg1, __attribute((ns_consumed)) id arg2){}; // expected-error {{incompatible b… 20 blk1 c3 = ^void (__attribute((ns_consumed)) id arg1, __attribute((ns_consumed)) id arg2){};
|
| H A D | attr-malloc.m | 4 - (id) test1 __attribute((malloc)); // expected-warning {{attribute only applies to functions}} method 5 - (int) test2 __attribute((malloc)); // expected-warning {{attribute only applies to functions}} method 8 id bar(void) __attribute((malloc)); // no-warning function 11 bptr baz(void) __attribute((malloc)); // no-warning function 13 __attribute((malloc)) id (*f)(void); // expected-warning {{attribute only applies to functions}} function 14 __attribute((malloc)) bptr (*g)(void); // expected-warning {{attribute only applies to functions}} function 15 __attribute((malloc)) void *(^h)(void); // expected-warning {{attribute only applies to functions}} function
|
| H A D | attr-objc-gc.m | 2 static id __attribute((objc_gc(weak))) a; function 3 static id __attribute((objc_gc(strong))) b; function 5 static id __attribute((objc_gc())) c; // expected-error{{'objc_gc' attribute requires a string}} function 6 static id __attribute((objc_gc(123))) d; // expected-error{{'objc_gc' attribute requires a string}} function 7 static id __attribute((objc_gc(foo, 456))) e; // expected-error{{'objc_gc' attribute takes one argu… function 8 static id __attribute((objc_gc(hello))) f; // expected-warning{{'objc_gc' attribute argument not su… function 26 void test2(id __attribute((objc_gc(strong))) *strong, 27 id __attribute((objc_gc(weak))) *weak) {
|
| H A D | super-dealloc-attribute.m | 8 #define NS_REQUIRES_SUPER __attribute((objc_requires_super)) 16 - MyDealloc __attribute((objc_requires_super)); method 17 - (void)XXX __attribute((objc_requires_super)); method 18 - (void) dealloc __attribute((objc_requires_super)); // expected-warning {{'objc_requires_super' at… method 20 - (void) AnnotMyDeallocMeth __attribute((objc_requires_super)); method 23 + (void)registerClass:(id)name __attribute((objc_requires_super)); 28 - (void) MyDeallocMeth __attribute((objc_requires_super)); // 'Baz' author has annotated method method 30 - (void) AnnotMeth __attribute((objc_requires_super)); // 'Baz' author has annotated method method 61 - (void) AnnotMethCAT __attribute((objc_requires_super)); method in CAT
|
| /llvm-project-15.0.7/clang/test/SemaObjCXX/ |
| H A D | arc-nsconsumed-errors.mm | 4 typedef void (^blk)(id, __attribute((ns_consumed)) id); 5 typedef void (^blk1)(__attribute((ns_consumed))id, __attribute((ns_consumed)) id); 6 blk a = ^void (__attribute((ns_consumed)) id, __attribute((ns_consumed)) id){}; // expected-error {… 8 blk b = ^void (id, __attribute((ns_consumed)) id){}; 10 blk c = ^void (__attribute((ns_consumed)) id, __attribute((ns_consumed)) id){}; // expected-error {… 14 blk1 a1 = ^void (__attribute((ns_consumed)) id, id){}; // expected-error {{cannot initialize a vari… 16 blk1 b2 = ^void (id, __attribute((ns_consumed)) id){}; // expected-error {{cannot initialize a vari… 18 blk1 c3 = ^void (__attribute((ns_consumed)) id, __attribute((ns_consumed)) id){};
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | nonnull.m | 73 extern void rdar16153464_check(union rdar16153464_pub_ctx_t outer) __attribute((nonnull(1))); 80 void multipleAttributes_1(char *p, char *q) __attribute((nonnull(1))) __attribute((nonnull(2))); function 102 void multipleAttributes_2(char *p, char *q) __attribute((nonnull(1))); function 103 void multipleAttributes_2(char *p, char *q) __attribute((nonnull(2))); function 120 void multipleAttributes_3(char *p, char *q) __attribute((nonnull(1))) __attribute((nonnull(1))); function 133 void multipleAttributes_4(char *p, char *q, char *r) __attribute((nonnull(1))) __attribute((nonnull… function 152 void multipleAttributes_all_1(char *p, char *q) __attribute((nonnull(1))) __attribute((nonnull)); function 165 void multipleAttributes_all_2(char *p, char *q) __attribute((nonnull)) __attribute((nonnull(2))); function
|
| H A D | malloc-annotations.c | 13 void __attribute((ownership_returns(malloc))) *my_malloc(size_t); 14 void __attribute((ownership_takes(malloc, 1))) my_free(void *); 16 __attribute((ownership_holds(malloc, 1, 2))); 17 void __attribute((ownership_returns(malloc, 1))) *my_malloc2(size_t); 18 void __attribute((ownership_holds(malloc, 1))) my_hold(void *); 23 void __attribute((ownership_holds(malloc, 1))) 24 __attribute((ownership_holds(malloc, 1))) 25 __attribute((ownership_holds(malloc, 3))) my_hold2(void *, void *, void *);
|
| /llvm-project-15.0.7/clang/test/CodeGenOpenCL/ |
| H A D | vectorLoadStore.cl | 3 typedef char char2 __attribute((ext_vector_type(2))); 4 typedef char char3 __attribute((ext_vector_type(3))); 5 typedef char char8 __attribute((ext_vector_type(8))); 6 typedef float float4 __attribute((ext_vector_type(4)));
|
| /llvm-project-15.0.7/clang/test/CodeGen/X86/ |
| H A D | x86_32-arguments-darwin.c | 157 typedef int v39 __attribute((vector_size(16))); typedef 289 struct s59 { float x __attribute((aligned(8))); }; 293 struct s60 { int x __attribute((aligned(8))); }; 297 typedef int T61 __attribute((vector_size(16))); typedef 302 typedef int T62 __attribute((vector_size(16))); typedef 303 struct s62 { T62 x; int y; } __attribute((packed, aligned(8))); 310 typedef int T63 __attribute((vector_size(16))); typedef 332 typedef int T66 __attribute((vector_size(16))); typedef
|