diff options
Diffstat (limited to 'test/SemaCXX/warn-thread-safety-parsing.cpp')
-rw-r--r-- | test/SemaCXX/warn-thread-safety-parsing.cpp | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/test/SemaCXX/warn-thread-safety-parsing.cpp b/test/SemaCXX/warn-thread-safety-parsing.cpp index 1bd4e439b7b0..6f9e7de4176d 100644 --- a/test/SemaCXX/warn-thread-safety-parsing.cpp +++ b/test/SemaCXX/warn-thread-safety-parsing.cpp @@ -109,26 +109,26 @@ int noanal_testfn(int y) NO_THREAD_SAFETY_ANALYSIS; int noanal_testfn(int y) { int x NO_THREAD_SAFETY_ANALYSIS = y; // \ - // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}} + // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} return x; }; int noanal_test_var NO_THREAD_SAFETY_ANALYSIS; // \ - // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}} + // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} class NoanalFoo { private: int test_field NO_THREAD_SAFETY_ANALYSIS; // \ - // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}} + // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} void test_method() NO_THREAD_SAFETY_ANALYSIS; }; class NO_THREAD_SAFETY_ANALYSIS NoanalTestClass { // \ - // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}} + // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} }; void noanal_fun_params(int lvar NO_THREAD_SAFETY_ANALYSIS); // \ - // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}} + // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} //-----------------------------------------// @@ -229,28 +229,28 @@ class __attribute__((lockable (1))) LTestClass_args { // \ }; void l_test_function() LOCKABLE; // \ - // expected-warning {{'lockable' attribute only applies to classes}} + // expected-warning {{'lockable' attribute only applies to struct, union or class}} int l_testfn(int y) { int x LOCKABLE = y; // \ - // expected-warning {{'lockable' attribute only applies to classes}} + // expected-warning {{'lockable' attribute only applies to struct, union or class}} return x; } int l_test_var LOCKABLE; // \ - // expected-warning {{'lockable' attribute only applies to classes}} + // expected-warning {{'lockable' attribute only applies to struct, union or class}} class LFoo { private: int test_field LOCKABLE; // \ - // expected-warning {{'lockable' attribute only applies to classes}} + // expected-warning {{'lockable' attribute only applies to struct, union or class}} void test_method() LOCKABLE; // \ - // expected-warning {{'lockable' attribute only applies to classes}} + // expected-warning {{'lockable' attribute only applies to struct, union or class}} }; void l_function_params(int lvar LOCKABLE); // \ - // expected-warning {{'lockable' attribute only applies to classes}} + // expected-warning {{'lockable' attribute only applies to struct, union or class}} //-----------------------------------------// @@ -269,28 +269,28 @@ class __attribute__((scoped_lockable (1))) SLTestClass_args { // \ }; void sl_test_function() SCOPED_LOCKABLE; // \ - // expected-warning {{'scoped_lockable' attribute only applies to classes}} + // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}} int sl_testfn(int y) { int x SCOPED_LOCKABLE = y; // \ - // expected-warning {{'scoped_lockable' attribute only applies to classes}} + // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}} return x; } int sl_test_var SCOPED_LOCKABLE; // \ - // expected-warning {{'scoped_lockable' attribute only applies to classes}} + // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}} class SLFoo { private: int test_field SCOPED_LOCKABLE; // \ - // expected-warning {{'scoped_lockable' attribute only applies to classes}} + // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}} void test_method() SCOPED_LOCKABLE; // \ - // expected-warning {{'scoped_lockable' attribute only applies to classes}} + // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}} }; void sl_function_params(int lvar SCOPED_LOCKABLE); // \ - // expected-warning {{'scoped_lockable' attribute only applies to classes}} + // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}} //-----------------------------------------// @@ -353,13 +353,13 @@ int gb_var_arg_8 GUARDED_BY(muPointer); // illegal attribute arguments int gb_var_arg_bad_1 GUARDED_BY(1); // \ - // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'int'}} + // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} int gb_var_arg_bad_2 GUARDED_BY("mu"); // \ // expected-warning {{ignoring 'guarded_by' attribute because its argument is invalid}} int gb_var_arg_bad_3 GUARDED_BY(muDoublePointer); // \ - // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'class Mutex **'}} + // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int gb_var_arg_bad_4 GUARDED_BY(umu); // \ - // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class UnlockableMu'}} + // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'UnlockableMu'}} //3. // Thread Safety analysis tests @@ -424,13 +424,13 @@ int * pgb_var_arg_8 PT_GUARDED_BY(muPointer); // illegal attribute arguments int * pgb_var_arg_bad_1 PT_GUARDED_BY(1); // \ - // expected-warning {{'pt_guarded_by' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} int * pgb_var_arg_bad_2 PT_GUARDED_BY("mu"); // \ // expected-warning {{ignoring 'pt_guarded_by' attribute because its argument is invalid}} int * pgb_var_arg_bad_3 PT_GUARDED_BY(muDoublePointer); // \ - // expected-warning {{'pt_guarded_by' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int * pgb_var_arg_bad_4 PT_GUARDED_BY(umu); // \ - // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute}} //-----------------------------------------// @@ -446,12 +446,12 @@ int * pgb_var_arg_bad_4 PT_GUARDED_BY(umu); // \ Mutex mu_aa ACQUIRED_AFTER(mu1); Mutex aa_var_noargs __attribute__((acquired_after)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'acquired_after' attribute takes at least 1 argument}} class AAFoo { private: Mutex aa_field_noargs __attribute__((acquired_after)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'acquired_after' attribute takes at least 1 argument}} Mutex aa_field_args ACQUIRED_AFTER(mu1); }; @@ -485,15 +485,15 @@ Mutex aa_var_arg_8 ACQUIRED_AFTER(muPointer); // illegal attribute arguments Mutex aa_var_arg_bad_1 ACQUIRED_AFTER(1); // \ - // expected-warning {{'acquired_after' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} Mutex aa_var_arg_bad_2 ACQUIRED_AFTER("mu"); // \ // expected-warning {{ignoring 'acquired_after' attribute because its argument is invalid}} Mutex aa_var_arg_bad_3 ACQUIRED_AFTER(muDoublePointer); // \ - // expected-warning {{'acquired_after' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} Mutex aa_var_arg_bad_4 ACQUIRED_AFTER(umu); // \ - // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute}} UnlockableMu aa_var_arg_bad_5 ACQUIRED_AFTER(mu_aa); // \ - // expected-warning {{'acquired_after' attribute can only be applied in a context annotated with 'lockable' attribute}} + // expected-warning {{'acquired_after' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}} //-----------------------------------------// // Acquired Before (ab) @@ -506,12 +506,12 @@ UnlockableMu aa_var_arg_bad_5 ACQUIRED_AFTER(mu_aa); // \ Mutex mu_ab ACQUIRED_BEFORE(mu1); Mutex ab_var_noargs __attribute__((acquired_before)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'acquired_before' attribute takes at least 1 argument}} class ABFoo { private: Mutex ab_field_noargs __attribute__((acquired_before)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'acquired_before' attribute takes at least 1 argument}} Mutex ab_field_args ACQUIRED_BEFORE(mu1); }; @@ -548,15 +548,15 @@ Mutex ab_var_arg_8 ACQUIRED_BEFORE(muPointer); // illegal attribute arguments Mutex ab_var_arg_bad_1 ACQUIRED_BEFORE(1); // \ - // expected-warning {{'acquired_before' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} Mutex ab_var_arg_bad_2 ACQUIRED_BEFORE("mu"); // \ // expected-warning {{ignoring 'acquired_before' attribute because its argument is invalid}} Mutex ab_var_arg_bad_3 ACQUIRED_BEFORE(muDoublePointer); // \ - // expected-warning {{'acquired_before' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} Mutex ab_var_arg_bad_4 ACQUIRED_BEFORE(umu); // \ - // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute}} UnlockableMu ab_var_arg_bad_5 ACQUIRED_BEFORE(mu_ab); // \ - // expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'lockable' attribute}} + // expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}} //-----------------------------------------// @@ -577,26 +577,26 @@ int elf_testfn(int y) EXCLUSIVE_LOCK_FUNCTION(); int elf_testfn(int y) { int x EXCLUSIVE_LOCK_FUNCTION() = y; // \ - // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_lock_function' attribute only applies to functions}} return x; }; int elf_test_var EXCLUSIVE_LOCK_FUNCTION(); // \ - // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_lock_function' attribute only applies to functions}} class ElfFoo { private: int test_field EXCLUSIVE_LOCK_FUNCTION(); // \ - // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_lock_function' attribute only applies to functions}} void test_method() EXCLUSIVE_LOCK_FUNCTION(); }; class EXCLUSIVE_LOCK_FUNCTION() ElfTestClass { // \ - // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_lock_function' attribute only applies to functions}} }; void elf_fun_params(int lvar EXCLUSIVE_LOCK_FUNCTION()); // \ - // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_lock_function' attribute only applies to functions}} // Check argument parsing. @@ -617,9 +617,9 @@ int elf_function_9(Mutex x, Mutex y) EXCLUSIVE_LOCK_FUNCTION(1,2); int elf_function_bad_2() EXCLUSIVE_LOCK_FUNCTION("mu"); // \ // expected-warning {{ignoring 'exclusive_lock_function' attribute because its argument is invalid}} int elf_function_bad_3() EXCLUSIVE_LOCK_FUNCTION(muDoublePointer); // \ - // expected-warning {{'exclusive_lock_function' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'exclusive_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int elf_function_bad_4() EXCLUSIVE_LOCK_FUNCTION(umu); // \ - // expected-warning {{'exclusive_lock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'exclusive_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute}} int elf_function_bad_1() EXCLUSIVE_LOCK_FUNCTION(1); // \ // expected-error {{'exclusive_lock_function' attribute parameter 1 is out of bounds: no parameters to index into}} @@ -649,25 +649,25 @@ int slf_testfn(int y) SHARED_LOCK_FUNCTION(); int slf_testfn(int y) { int x SHARED_LOCK_FUNCTION() = y; // \ - // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_lock_function' attribute only applies to functions}} return x; }; int slf_test_var SHARED_LOCK_FUNCTION(); // \ - // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_lock_function' attribute only applies to functions}} void slf_fun_params(int lvar SHARED_LOCK_FUNCTION()); // \ - // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_lock_function' attribute only applies to functions}} class SlfFoo { private: int test_field SHARED_LOCK_FUNCTION(); // \ - // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_lock_function' attribute only applies to functions}} void test_method() SHARED_LOCK_FUNCTION(); }; class SHARED_LOCK_FUNCTION() SlfTestClass { // \ - // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_lock_function' attribute only applies to functions}} }; // Check argument parsing. @@ -689,9 +689,9 @@ int slf_function_9(Mutex x, Mutex y) SHARED_LOCK_FUNCTION(1,2); int slf_function_bad_2() SHARED_LOCK_FUNCTION("mu"); // \ // expected-warning {{ignoring 'shared_lock_function' attribute because its argument is invalid}} int slf_function_bad_3() SHARED_LOCK_FUNCTION(muDoublePointer); // \ - // expected-warning {{'shared_lock_function' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'shared_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int slf_function_bad_4() SHARED_LOCK_FUNCTION(umu); // \ - // expected-warning {{'shared_lock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'shared_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute}} int slf_function_bad_1() SHARED_LOCK_FUNCTION(1); // \ // expected-error {{'shared_lock_function' attribute parameter 1 is out of bounds: no parameters to index into}} @@ -715,7 +715,7 @@ int slf_function_bad_7() SHARED_LOCK_FUNCTION(0); // \ // plus an optional list of locks (vars/fields) void etf_function() __attribute__((exclusive_trylock_function)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'exclusive_trylock_function' attribute takes at least 1 argument}} void etf_function_args() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu2); @@ -725,26 +725,26 @@ int etf_testfn(int y) EXCLUSIVE_TRYLOCK_FUNCTION(1); int etf_testfn(int y) { int x EXCLUSIVE_TRYLOCK_FUNCTION(1) = y; // \ - // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}} return x; }; int etf_test_var EXCLUSIVE_TRYLOCK_FUNCTION(1); // \ - // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}} class EtfFoo { private: int test_field EXCLUSIVE_TRYLOCK_FUNCTION(1); // \ - // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}} void test_method() EXCLUSIVE_TRYLOCK_FUNCTION(1); }; class EXCLUSIVE_TRYLOCK_FUNCTION(1) EtfTestClass { // \ - // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}} }; void etf_fun_params(int lvar EXCLUSIVE_TRYLOCK_FUNCTION(1)); // \ - // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}} // Check argument parsing. @@ -771,9 +771,9 @@ int etf_function_bad_3() EXCLUSIVE_TRYLOCK_FUNCTION(muDoublePointer); // \ int etf_function_bad_4() EXCLUSIVE_TRYLOCK_FUNCTION(1, "mu"); // \ // expected-warning {{ignoring 'exclusive_trylock_function' attribute because its argument is invalid}} int etf_function_bad_5() EXCLUSIVE_TRYLOCK_FUNCTION(1, muDoublePointer); // \ - // expected-warning {{'exclusive_trylock_function' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int etf_function_bad_6() EXCLUSIVE_TRYLOCK_FUNCTION(1, umu); // \ - // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute}} //-----------------------------------------// @@ -788,7 +788,7 @@ int etf_function_bad_6() EXCLUSIVE_TRYLOCK_FUNCTION(1, umu); // \ // plus an optional list of locks (vars/fields) void stf_function() __attribute__((shared_trylock_function)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'shared_trylock_function' attribute takes at least 1 argument}} void stf_function_args() SHARED_TRYLOCK_FUNCTION(1, mu2); @@ -798,26 +798,26 @@ int stf_testfn(int y) SHARED_TRYLOCK_FUNCTION(1); int stf_testfn(int y) { int x SHARED_TRYLOCK_FUNCTION(1) = y; // \ - // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_trylock_function' attribute only applies to functions}} return x; }; int stf_test_var SHARED_TRYLOCK_FUNCTION(1); // \ - // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_trylock_function' attribute only applies to functions}} void stf_fun_params(int lvar SHARED_TRYLOCK_FUNCTION(1)); // \ - // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_trylock_function' attribute only applies to functions}} class StfFoo { private: int test_field SHARED_TRYLOCK_FUNCTION(1); // \ - // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_trylock_function' attribute only applies to functions}} void test_method() SHARED_TRYLOCK_FUNCTION(1); }; class SHARED_TRYLOCK_FUNCTION(1) StfTestClass { // \ - // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}} + // expected-warning {{'shared_trylock_function' attribute only applies to functions}} }; // Check argument parsing. @@ -845,9 +845,9 @@ int stf_function_bad_3() SHARED_TRYLOCK_FUNCTION(muDoublePointer); // \ int stf_function_bad_4() SHARED_TRYLOCK_FUNCTION(1, "mu"); // \ // expected-warning {{ignoring 'shared_trylock_function' attribute because its argument is invalid}} int stf_function_bad_5() SHARED_TRYLOCK_FUNCTION(1, muDoublePointer); // \ - // expected-warning {{'shared_trylock_function' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int stf_function_bad_6() SHARED_TRYLOCK_FUNCTION(1, umu); // \ - // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute}} //-----------------------------------------// @@ -868,26 +868,26 @@ int uf_testfn(int y) UNLOCK_FUNCTION(); int uf_testfn(int y) { int x UNLOCK_FUNCTION() = y; // \ - // expected-warning {{'unlock_function' attribute only applies to functions and methods}} + // expected-warning {{'unlock_function' attribute only applies to functions}} return x; }; int uf_test_var UNLOCK_FUNCTION(); // \ - // expected-warning {{'unlock_function' attribute only applies to functions and methods}} + // expected-warning {{'unlock_function' attribute only applies to functions}} class UfFoo { private: int test_field UNLOCK_FUNCTION(); // \ - // expected-warning {{'unlock_function' attribute only applies to functions and methods}} + // expected-warning {{'unlock_function' attribute only applies to functions}} void test_method() UNLOCK_FUNCTION(); }; class NO_THREAD_SAFETY_ANALYSIS UfTestClass { // \ - // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}} + // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}} }; void uf_fun_params(int lvar UNLOCK_FUNCTION()); // \ - // expected-warning {{'unlock_function' attribute only applies to functions and methods}} + // expected-warning {{'unlock_function' attribute only applies to functions}} // Check argument parsing. @@ -908,9 +908,9 @@ int uf_function_9(Mutex x, Mutex y) UNLOCK_FUNCTION(1,2); int uf_function_bad_2() UNLOCK_FUNCTION("mu"); // \ // expected-warning {{ignoring 'unlock_function' attribute because its argument is invalid}} int uf_function_bad_3() UNLOCK_FUNCTION(muDoublePointer); // \ - // expected-warning {{'unlock_function' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'unlock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int uf_function_bad_4() UNLOCK_FUNCTION(umu); // \ - // expected-warning {{'unlock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'unlock_function' attribute requires arguments whose type is annotated with 'capability' attribute}} int uf_function_bad_1() UNLOCK_FUNCTION(1); // \ // expected-error {{'unlock_function' attribute parameter 1 is out of bounds: no parameters to index into}} @@ -944,25 +944,25 @@ int lr_testfn(int y) LOCK_RETURNED(mu1); int lr_testfn(int y) { int x LOCK_RETURNED(mu1) = y; // \ - // expected-warning {{'lock_returned' attribute only applies to functions and methods}} + // expected-warning {{'lock_returned' attribute only applies to functions}} return x; }; int lr_test_var LOCK_RETURNED(mu1); // \ - // expected-warning {{'lock_returned' attribute only applies to functions and methods}} + // expected-warning {{'lock_returned' attribute only applies to functions}} void lr_fun_params(int lvar LOCK_RETURNED(mu1)); // \ - // expected-warning {{'lock_returned' attribute only applies to functions and methods}} + // expected-warning {{'lock_returned' attribute only applies to functions}} class LrFoo { private: int test_field LOCK_RETURNED(mu1); // \ - // expected-warning {{'lock_returned' attribute only applies to functions and methods}} + // expected-warning {{'lock_returned' attribute only applies to functions}} void test_method() LOCK_RETURNED(mu1); }; class LOCK_RETURNED(mu1) LrTestClass { // \ - // expected-warning {{'lock_returned' attribute only applies to functions and methods}} + // expected-warning {{'lock_returned' attribute only applies to functions}} }; // Check argument parsing. @@ -980,13 +980,13 @@ int lr_function_8() LOCK_RETURNED(muPointer); // illegal attribute arguments int lr_function_bad_1() LOCK_RETURNED(1); // \ - // expected-warning {{'lock_returned' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} int lr_function_bad_2() LOCK_RETURNED("mu"); // \ // expected-warning {{ignoring 'lock_returned' attribute because its argument is invalid}} int lr_function_bad_3() LOCK_RETURNED(muDoublePointer); // \ - // expected-warning {{'lock_returned' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int lr_function_bad_4() LOCK_RETURNED(umu); // \ - // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute}} @@ -1001,7 +1001,7 @@ int lr_function_bad_4() LOCK_RETURNED(umu); // \ // takes one or more arguments, all locks (vars/fields) void le_function() __attribute__((locks_excluded)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'locks_excluded' attribute takes at least 1 argument}} void le_function_arg() LOCKS_EXCLUDED(mu1); @@ -1011,25 +1011,25 @@ int le_testfn(int y) LOCKS_EXCLUDED(mu1); int le_testfn(int y) { int x LOCKS_EXCLUDED(mu1) = y; // \ - // expected-warning {{'locks_excluded' attribute only applies to functions and methods}} + // expected-warning {{'locks_excluded' attribute only applies to functions}} return x; }; int le_test_var LOCKS_EXCLUDED(mu1); // \ - // expected-warning {{'locks_excluded' attribute only applies to functions and methods}} + // expected-warning {{'locks_excluded' attribute only applies to functions}} void le_fun_params(int lvar LOCKS_EXCLUDED(mu1)); // \ - // expected-warning {{'locks_excluded' attribute only applies to functions and methods}} + // expected-warning {{'locks_excluded' attribute only applies to functions}} class LeFoo { private: int test_field LOCKS_EXCLUDED(mu1); // \ - // expected-warning {{'locks_excluded' attribute only applies to functions and methods}} + // expected-warning {{'locks_excluded' attribute only applies to functions}} void test_method() LOCKS_EXCLUDED(mu1); }; class LOCKS_EXCLUDED(mu1) LeTestClass { // \ - // expected-warning {{'locks_excluded' attribute only applies to functions and methods}} + // expected-warning {{'locks_excluded' attribute only applies to functions}} }; // Check argument parsing. @@ -1047,13 +1047,13 @@ int le_function_8() LOCKS_EXCLUDED(muPointer); // illegal attribute arguments int le_function_bad_1() LOCKS_EXCLUDED(1); // \ - // expected-warning {{'locks_excluded' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} int le_function_bad_2() LOCKS_EXCLUDED("mu"); // \ // expected-warning {{ignoring 'locks_excluded' attribute because its argument is invalid}} int le_function_bad_3() LOCKS_EXCLUDED(muDoublePointer); // \ - // expected-warning {{'locks_excluded' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int le_function_bad_4() LOCKS_EXCLUDED(umu); // \ - // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'capability' attribute}} @@ -1068,7 +1068,7 @@ int le_function_bad_4() LOCKS_EXCLUDED(umu); // \ // takes one or more arguments, all locks (vars/fields) void elr_function() __attribute__((exclusive_locks_required)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'exclusive_locks_required' attribute takes at least 1 argument}} void elr_function_arg() EXCLUSIVE_LOCKS_REQUIRED(mu1); @@ -1078,25 +1078,25 @@ int elr_testfn(int y) EXCLUSIVE_LOCKS_REQUIRED(mu1); int elr_testfn(int y) { int x EXCLUSIVE_LOCKS_REQUIRED(mu1) = y; // \ - // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_locks_required' attribute only applies to functions}} return x; }; int elr_test_var EXCLUSIVE_LOCKS_REQUIRED(mu1); // \ - // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_locks_required' attribute only applies to functions}} void elr_fun_params(int lvar EXCLUSIVE_LOCKS_REQUIRED(mu1)); // \ - // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_locks_required' attribute only applies to functions}} class ElrFoo { private: int test_field EXCLUSIVE_LOCKS_REQUIRED(mu1); // \ - // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_locks_required' attribute only applies to functions}} void test_method() EXCLUSIVE_LOCKS_REQUIRED(mu1); }; class EXCLUSIVE_LOCKS_REQUIRED(mu1) ElrTestClass { // \ - // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'exclusive_locks_required' attribute only applies to functions}} }; // Check argument parsing. @@ -1114,13 +1114,13 @@ int elr_function_8() EXCLUSIVE_LOCKS_REQUIRED(muPointer); // illegal attribute arguments int elr_function_bad_1() EXCLUSIVE_LOCKS_REQUIRED(1); // \ - // expected-warning {{'exclusive_locks_required' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} int elr_function_bad_2() EXCLUSIVE_LOCKS_REQUIRED("mu"); // \ // expected-warning {{ignoring 'exclusive_locks_required' attribute because its argument is invalid}} int elr_function_bad_3() EXCLUSIVE_LOCKS_REQUIRED(muDoublePointer); // \ - // expected-warning {{'exclusive_locks_required' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int elr_function_bad_4() EXCLUSIVE_LOCKS_REQUIRED(umu); // \ - // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute}} @@ -1136,7 +1136,7 @@ int elr_function_bad_4() EXCLUSIVE_LOCKS_REQUIRED(umu); // \ // takes one or more arguments, all locks (vars/fields) void slr_function() __attribute__((shared_locks_required)); // \ - // expected-error {{attribute takes at least 1 argument}} + // expected-error {{'shared_locks_required' attribute takes at least 1 argument}} void slr_function_arg() SHARED_LOCKS_REQUIRED(mu1); @@ -1146,25 +1146,25 @@ int slr_testfn(int y) SHARED_LOCKS_REQUIRED(mu1); int slr_testfn(int y) { int x SHARED_LOCKS_REQUIRED(mu1) = y; // \ - // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'shared_locks_required' attribute only applies to functions}} return x; }; int slr_test_var SHARED_LOCKS_REQUIRED(mu1); // \ - // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'shared_locks_required' attribute only applies to functions}} void slr_fun_params(int lvar SHARED_LOCKS_REQUIRED(mu1)); // \ - // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'shared_locks_required' attribute only applies to functions}} class SlrFoo { private: int test_field SHARED_LOCKS_REQUIRED(mu1); // \ - // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'shared_locks_required' attribute only applies to functions}} void test_method() SHARED_LOCKS_REQUIRED(mu1); }; class SHARED_LOCKS_REQUIRED(mu1) SlrTestClass { // \ - // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}} + // expected-warning {{'shared_locks_required' attribute only applies to functions}} }; // Check argument parsing. @@ -1182,13 +1182,13 @@ int slr_function_8() SHARED_LOCKS_REQUIRED(muPointer); // illegal attribute arguments int slr_function_bad_1() SHARED_LOCKS_REQUIRED(1); // \ - // expected-warning {{'shared_locks_required' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}} int slr_function_bad_2() SHARED_LOCKS_REQUIRED("mu"); // \ // expected-warning {{ignoring 'shared_locks_required' attribute because its argument is invalid}} int slr_function_bad_3() SHARED_LOCKS_REQUIRED(muDoublePointer); // \ - // expected-warning {{'shared_locks_required' attribute requires arguments that are class type or point to class type}} + // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}} int slr_function_bad_4() SHARED_LOCKS_REQUIRED(umu); // \ - // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'lockable' attribute}} + // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute}} //-----------------------------------------// @@ -1430,7 +1430,7 @@ class Foo { int a GUARDED_BY(mu1_); int b GUARDED_BY(mu2_); int c GUARDED_BY(mu3_); // \ - // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class InheritanceTest::Derived3'}} + // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'InheritanceTest::Derived3'}} void foo() EXCLUSIVE_LOCKS_REQUIRED(mu1_, mu2_) { a = 0; |