/llvm-project/clang/test/Parser/ |
H A D | cxx0x-keyword-attributes.cpp | 41 ATTR_USE int before_attr; // expected-error {{'ATTR_NAME' only applies to function types}} 42 int ATTR_USE between_attr; // expected-error {{'ATTR_NAME' only applies to function types}} 44 int after_attr ATTR_USE; // expected-error {{'ATTR_NAME' only applies to function types}} 45 int * ATTR_USE ptr_attr; // expected-error {{'ATTR_NAME' only applies to function types}} 46 int & ATTR_USE ref_attr = after_attr; // expected-error {{'ATTR_NAME' only applies to function type… 47 int && ATTR_USE rref_attr = 0; // expected-error {{'ATTR_NAME' only applies to function types}} 48 int array_attr [1] ATTR_USE; // expected-error {{'ATTR_NAME' only applies to function types}} 54 struct ATTR_USE struct_attr; // expected-error {{'ATTR_NAME' only applies to non-K&R-style function… 55 class ATTR_USE class_attr {}; // expected-error {{'ATTR_NAME' only applies to non-K&R-style functio… 56 union ATTR_USE union_attr; // expected-error {{'ATTR_NAME' only applies to non-K&R-style functions}} [all …]
|
H A D | c2x-attribute-keywords.c | 8 enum ATTR_USE E { // expected-error {{'ATTR_NAME' only applies to non-K&R-style functions}} 9 One ATTR_USE, // expected-error {{'ATTR_NAME' only applies to non-K&R-style functions}} 11 Three ATTR_USE // expected-error {{'ATTR_NAME' only applies to non-K&R-style functions}} 14 enum ATTR_USE { Four }; // expected-error {{'ATTR_NAME' only applies to non-K&R-style functions}} 23 struct ATTR_USE S1 { // expected-error {{'ATTR_NAME' only applies to non-K&R-style functions}} 24 int i ATTR_USE; // expected-error {{'ATTR_NAME' only applies to function types}} 25 int ATTR_USE j; // expected-error {{'ATTR_NAME' only applies to function types}} 26 int k[10] ATTR_USE; // expected-error {{'ATTR_NAME' only applies to function types}} 27 int l ATTR_USE[10]; // expected-error {{'ATTR_NAME' only applies to function types}} 28 ATTR_USE int m, n; // expected-error {{'ATTR_NAME' only applies to function types}} [all …]
|
/llvm-project/clang/test/SemaObjC/ |
H A D | attr-cf_returns.m | 13 int x CF_RETURNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to fun… 14 …_RETAINED; // expected-warning{{'cf_returns_not_retained' attribute only applies to functions, met… 18 …URNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to functions that… 19 …URNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to functions that… 25 …URNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to methods that r… 26 …URNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to methods that r… 31 …URNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to properties tha… 32 …URNS_RETAINED; // expected-warning{{'cf_returns_retained' attribute only applies to properties tha… 38 …URNS_RETAINED, // expected-warning{{'cf_returns_retained' attribute only applies to pointer-to-CF-… 39 …URNS_RETAINED, // expected-warning{{'cf_returns_retained' attribute only applies to pointer-to-CF-… [all …]
|
H A D | dllimport.m | 4 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob… 6 // expected-warning@-1{{'dllimport' attribute only applies to}} 8 // expected-warning@-1{{'dllimport' attribute only applies to}} 10 // expected-warning@-1{{'dllimport' attribute only applies to}} 12 // expected-warning@-1{{'dllimport' attribute only applies to}} 14 // expected-warning@-1{{'dllimport' attribute only applies to}}
|
H A D | dllexport.m | 4 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob… 6 // expected-warning@-1{{'dllexport' attribute only applies to}} 8 // expected-warning@-1{{'dllexport' attribute only applies to}} 10 // expected-warning@-1{{'dllexport' attribute only applies to}} 12 // expected-warning@-1{{'dllexport' attribute only applies to}} 14 // expected-warning@-1{{'dllexport' attribute only applies to}}
|
H A D | attr-malloc.m | 4 - (id) test1 __attribute((malloc)); // expected-warning {{attribute only applies to functions}} 5 - (int) test2 __attribute((malloc)); // expected-warning {{attribute only applies to functions}} 13 __attribute((malloc)) id (*f)(void); // expected-warning {{attribute only applies to functions}} 14 __attribute((malloc)) bptr (*g)(void); // expected-warning {{attribute only applies to functions}} 15 __attribute((malloc)) void *(^h)(void); // expected-warning {{attribute only applies to functions}}
|
/llvm-project/clang/test/Sema/ |
H A D | attr-osobject.cpp | 10 …cted_on_static(); // expected-warning{{'os_consumes_this' attribute only applies to non-static mem… 16 …ined_value() { // expected-warning{{'os_returns_retained' attribute only applies to functions that… in ret_retained_value() 24 …_value() { // expected-warning{{'os_returns_not_retained' attribute only applies to functions that… in ret_not_retained_value() 30 …(os_consumed)) S arg) {} // expected-warning{{os_consumed attribute only applies to pointer parame… in accept_consumed_arg_by_value() 34 …umed)) NoAttrOnStruct {}; // expected-warning{{'os_consumed' attribute only applies to parameters}} 40 …trOnStruct {}; // expected-warning{{'os_returns_retained' attribute only applies to functions, Obj… 46 …Struct {}; // expected-warning{{'os_returns_not_retained' attribute only applies to functions, Obj… 48 …_on_function() {} // expected-warning{{'os_consumes_this' attribute only applies to non-static mem… in no_consumes_this_on_function() 54 …{} // expected-warning{{'os_returns_retained_on_non_zero' attribute only applies to pointer/refere… in write_into_out_parameter_on_nonzero_invalid() 58 …ut) {} // expected-warning{{'os_returns_retained_on_zero' attribute only applies to pointer/refere… in write_into_out_parameter_on_zero_invalid() [all …]
|
H A D | attr-x86-interrupt.c | 12 struct a test __attribute__((interrupt)); // expected-warning {{'interrupt' attribute only applies … 14 … // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo1() 15 … // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo2() 16 …c) {} // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo3() 17 … // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo4() 19 // expected-error-re@+6 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 21 // expected-error-re@+4 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 23 // expected-error-re@+2 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 27 // expected-error-re@+6 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 29 // expected-error-re@+4 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… [all …]
|
H A D | attr-uninitialized.c | 9 …e((uninitialized)); // expected-warning {{'uninitialized' attribute only applies to local variable… in bad() 12 … // expected-warning {{'uninitialized' attribute only applies to local variable… 13 … // expected-warning {{'uninitialized' attribute only applies to local variable… 14 …e((uninitialized)); // expected-warning {{'uninitialized' attribute only applies to local variable… 16 … // expected-warning {{'uninitialized' attribute only applies to local variable… in answer_right_now() 17 …)) int whos_bad) {} // expected-warning {{'uninitialized' attribute only applies to local variable… in just_to_tell_you_once_again() 20 …t youre_doin_wrong; // expected-warning {{'uninitialized' attribute only applies to local variable… 21 … // expected-warning {{'uninitialized' attribute only applies to local variable…
|
H A D | bpf-attr-preserve-static-offset-warns.c | 11 typedef int bar __pso; // expected-error{{attribute only applies to}} 13 int a __pso; // expected-error{{attribute only applies to}} 15 int g __pso; // expected-error{{attribute only applies to}} 16 __pso void ffunc1(void); // expected-error{{attribute only applies to}} 17 void ffunc2(int a __pso); // expected-error{{attribute only applies to}} 19 int a __pso; // expected-error{{attribute only applies to}} in ffunc3()
|
H A D | attr-only-in-default-eval.cpp | 6 // expected-error@+1{{'available_only_in_default_eval_method' attribute only applies to typedefs}} 9 // expected-error@+1{{'available_only_in_default_eval_method' attribute only applies to typedefs}} 13 // expected-error@+1{{'available_only_in_default_eval_method' attribute only applies to typedefs}} 15 // expected-error@+1{{'available_only_in_default_eval_method' attribute only applies to typedefs}} 18 // expected-error@+1{{'available_only_in_default_eval_method' attribute only applies to typedefs}} 24 // expected-error@+1{{'available_only_in_default_eval_method' attribute only applies to typedefs}}
|
H A D | attr-handles.cpp | 7 …bute__((acquire_handle("Fuchsia")))); // expected-error {{attribute only applies to output paramet… 11 …"Fuchsia"))) int i(); // expected-warning {{'release_handle' attribute only applies to parameters}} 12 …dle("Fuchsia"))) int j(); // expected-warning {{'use_handle' attribute only applies to parameters}} 13 …ndle("Fuchsia"))); // expected-warning {{'acquire_handle' attribute only applies to functions, typ… 14 …"))) fpt)(char *); // expected-warning {{'acquire_handle' attribute only applies to functions, typ… 19 …e("Fuchsia"))) ta; // expected-warning {{'acquire_handle' attribute only applies to functions, typ…
|
/llvm-project/clang/test/SemaCXX/ |
H A D | warn-thread-safety-parsing.cpp | 120 // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} 125 // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} 130 // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} 135 // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} 139 // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} 163 // expected-warning {{'guarded_var' attribute only applies to non-static data members and global variables}} 167 // expected-warning {{'guarded_var' attribute only applies to}} in gv_testfn() 170 // expected-warning {{'guarded_var' attribute only applies to}} in gv_testfn() 174 // expected-warning {{'guarded_var' attribute only applies to}} 191 // expected-warning {{'pt_guarded_var' only applies t [all...] |
H A D | attr-x86-interrupt.cpp | 10 …terrupt)) { return 0; } // expected-warning {{'interrupt' attribute only applies to non-K&R-style … in operator new() 13 struct a test __attribute__((interrupt)); // expected-warning {{'interrupt' attribute only applies … 15 … // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo1() 16 … // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo2() 17 …c) {} // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo3() 18 … // expected-error-re {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that… in foo4() 20 // expected-error-re@+6 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 22 // expected-error-re@+4 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 24 // expected-error-re@+2 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… 28 // expected-error-re@+6 {{{{(x86|x86-64)}} 'interrupt' attribute only applies to functions that hav… [all …]
|
H A D | warn-consumed-parsing.cpp | 25 int var0 SET_TYPESTATE(consumed); // expected-warning {{'set_typestate' attribute only applies to f… 26 int var1 TEST_TYPESTATE(consumed); // expected-warning {{'test_typestate' attribute only applies to… 27 int var2 CALLABLE_WHEN("consumed"); // expected-warning {{'callable_when' attribute only applies to… 28 int var3 CONSUMABLE(consumed); // expected-warning {{'consumable' attribute only applies to classes… 29 …TYPESTATE(consumed); // expected-warning {{'return_typestate' attribute only applies to functions}} 31 …ction0() SET_TYPESTATE(consumed); // expected-warning {{'set_typestate' attribute only applies to}} 32 …ion1() TEST_TYPESTATE(consumed); // expected-warning {{'test_typestate' attribute only applies to}} 33 …ion2() CALLABLE_WHEN("consumed"); // expected-warning {{'callable_when' attribute only applies to}} 34 void function3() CONSUMABLE(consumed); // expected-warning {{'consumable' attribute only applies to…
|
H A D | cxx2a-no-unique-address.cpp | 4 [[no_unique_address]] int a; // expected-error {{only applies to non-bit-field non-static data memb… 5 [[no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static data m… 6 struct [[no_unique_address]] S { // expected-error {{only applies to non-bit-field non-static data … 8 …[[no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static data … 9 …[[no_unique_address]] static int sa;// expected-error {{only applies to non-bit-field non-static d… 10 …[[no_unique_address]] static void sf(); // expected-error {{only applies to non-bit-field non-stat… 11 …[[no_unique_address]] int b : 3; // expected-error {{only applies to non-bit-field non-static data…
|
H A D | attr-flatten.cpp | 3 int i __attribute__((flatten)); // expected-error {{'flatten' attribute only applies to functions}} 11 int f3(int __attribute__((flatten)), int); // expected-error{{'flatten' attribute only applies to f… 14 …int f __attribute__((flatten)); // expected-error{{'flatten' attribute only applies to functions}} 19 int ci [[gnu::flatten]]; // expected-error {{'flatten' attribute only applies to functions}} 28 int cf3(int c[[gnu::flatten]], int); // expected-error{{'flatten' attribute only applies to functio… 31 int f [[gnu::flatten]]; // expected-error{{'flatten' attribute only applies to functions}}
|
H A D | attr-no-speculative-load-hardening.cpp | 3 …dening)); // expected-error {{'no_speculative_load_hardening' attribute only applies to functions}} 11 …)), int); // expected-error {{'no_speculative_load_hardening' attribute only applies to functions}} 14 …ening)); // expected-error {{'no_speculative_load_hardening' attribute only applies to functions}} 19 …dening]]; // expected-error {{'no_speculative_load_hardening' attribute only applies to functions}} 28 …]], int); // expected-error {{'no_speculative_load_hardening' attribute only applies to functions}} 31 …ening]]; // expected-error {{'no_speculative_load_hardening' attribute only applies to functions}}
|
H A D | attr-no-split-stack.cpp | 3 int i __attribute__((no_split_stack)); // expected-error {{'no_split_stack' attribute only applies … 11 …((no_split_stack)), int); // expected-error{{'no_split_stack' attribute only applies to functions}} 14 …ute__((no_split_stack)); // expected-error{{'no_split_stack' attribute only applies to functions}} 19 int ci [[gnu::no_split_stack]]; // expected-error {{'no_split_stack' attribute only applies to func… 28 …::no_split_stack]], int); // expected-error{{'no_split_stack' attribute only applies to functions}} 31 …int f [[gnu::no_split_stack]]; // expected-error{{'no_split_stack' attribute only applies to func…
|
H A D | cxx2a-ms-no-unique-address.cpp | 4 [[msvc::no_unique_address]] int a; // expected-error {{only applies to non-bit-field non-static dat… 5 [[msvc::no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static … 6 struct [[msvc::no_unique_address]] S { // expected-error {{only applies to non-bit-field non-static… 8 …[[msvc::no_unique_address]] void f(); // expected-error {{only applies to non-bit-field non-static… 9 …[[msvc::no_unique_address]] static int sa;// expected-error {{only applies to non-bit-field non-st… 10 …[[msvc::no_unique_address]] static void sf(); // expected-error {{only applies to non-bit-field no… 11 …[[msvc::no_unique_address]] int b : 3; // expected-error {{only applies to non-bit-field non-stati…
|
H A D | attr-reinitializes.cpp | 3 [[clang::reinitializes]] int a; // expected-error {{'reinitializes' attribute only applies to non-s… 5 [[clang::reinitializes]] void f(); // expected-error {{only applies to}} 10 [[clang::reinitializes]] void bar() const; // expected-error {{only applies to}} 11 [[clang::reinitializes]] static void baz(); // expected-error {{only applies to}} 12 [[clang::reinitializes]] int a; // expected-error {{only applies to}}
|
/llvm-project/clang/test/SemaObjCXX/ |
H A D | dllimport.mm | 4 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob… 6 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob… 8 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob… 10 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob… 12 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob… 15 // expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Ob…
|
H A D | dllexport.mm | 4 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob… 6 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob… 8 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob… 10 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob… 12 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob… 15 // expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Ob…
|
/llvm-project/clang/test/SemaHLSL/ |
H A D | group_shared.hlsl | 12 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 18 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 23 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 30 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 33 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 36 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 39 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 45 // expected-warning@+2 {{'groupshared' attribute only applies to variables}} 77 // expected-warning@+2 {{'groupshared' attribute only applies to variables}}
|
/llvm-project/clang/test/SemaOpenCL/ |
H A D | amdgpu-attrs.cl | 3 …32_64 { // expected-error {{'amdgpu_flat_work_group_size' attribute only applies to kernel functio… 7 …aves_per_eu_2 { // expected-error {{'amdgpu_waves_per_eu' attribute only applies to kernel functio… 11 …es_per_eu_2_4 { // expected-error {{'amdgpu_waves_per_eu' attribute only applies to kernel functio… 15 …truct_num_sgpr_32 { // expected-error {{'amdgpu_num_sgpr' attribute only applies to kernel functio… 19 …truct_num_vgpr_64 { // expected-error {{'amdgpu_num_vgpr' attribute only applies to kernel functio… 24 …64() {} // expected-error {{'amdgpu_flat_work_group_size' attribute only applies to kernel functio… 25 …s_per_eu_2() {} // expected-error {{'amdgpu_waves_per_eu' attribute only applies to kernel functio… 26 …per_eu_2_4() {} // expected-error {{'amdgpu_waves_per_eu' attribute only applies to kernel functio… 27 …nc_num_sgpr_32() {} // expected-error {{'amdgpu_num_sgpr' attribute only applies to kernel functio… 28 …nc_num_vgpr_64() {} // expected-error {{'amdgpu_num_vgpr' attribute only applies to kernel functio…
|