Home | History | Annotate | Download | only in SemaCXX

Lines Matching refs:SHARED_TRYLOCK_FUNCTION

16 #define SHARED_TRYLOCK_FUNCTION(...)    __attribute__ ((shared_trylock_function(__VA_ARGS__)))
34 bool ReaderTryLock() SHARED_TRYLOCK_FUNCTION(true);
783 #if !__has_attribute(shared_trylock_function)
784 #error "Should support shared_trylock_function attribute"
790 void stf_function() __attribute__((shared_trylock_function)); // \
791 // expected-error {{'shared_trylock_function' attribute takes at least 1 argument}}
793 void stf_function_args() SHARED_TRYLOCK_FUNCTION(1, mu2);
795 void stf_function_arg() SHARED_TRYLOCK_FUNCTION(1);
797 int stf_testfn(int y) SHARED_TRYLOCK_FUNCTION(1);
800 int x SHARED_TRYLOCK_FUNCTION(1) = y; // \
801 // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
805 int stf_test_var SHARED_TRYLOCK_FUNCTION(1); // \
806 // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
808 void stf_fun_params(int lvar SHARED_TRYLOCK_FUNCTION(1)); // \
809 // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
814 int test_field SHARED_TRYLOCK_FUNCTION(1); // \
815 // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
816 void test_method() SHARED_TRYLOCK_FUNCTION(1);
819 class SHARED_TRYLOCK_FUNCTION(1) StfTestClass { // \
820 // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
826 int stf_function_1() SHARED_TRYLOCK_FUNCTION(1, muWrapper.mu);
827 int stf_function_2() SHARED_TRYLOCK_FUNCTION(1, muDoubleWrapper.muWrapper->mu);
828 int stf_function_3() SHARED_TRYLOCK_FUNCTION(1, muWrapper.getMu());
829 int stf_function_4() SHARED_TRYLOCK_FUNCTION(1, *muWrapper.getMuPointer());
830 int stf_function_5() SHARED_TRYLOCK_FUNCTION(1, &mu1);
831 int stf_function_6() SHARED_TRYLOCK_FUNCTION(1, muRef);
832 int stf_function_7() SHARED_TRYLOCK_FUNCTION(1, muDoubleWrapper.getWrapper()->getMu());
833 int stf_function_8() SHARED_TRYLOCK_FUNCTION(1, muPointer);
834 int stf_function_9() SHARED_TRYLOCK_FUNCTION(true);
838 int stf_function_bad_1() SHARED_TRYLOCK_FUNCTION(mu1); // \
839 shared_trylock_function' attribute requires parameter 1 to be int or bool}}
840 int stf_function_bad_2() SHARED_TRYLOCK_FUNCTION("mu"); // \
841 // expected-error {{'shared_trylock_function' attribute requires parameter 1 to be int or bool}}
842 int stf_function_bad_3() SHARED_TRYLOCK_FUNCTION(muDoublePointer); // \
843 // expected-error {{'shared_trylock_function' attribute requires parameter 1 to be int or bool}}
845 int stf_function_bad_4() SHARED_TRYLOCK_FUNCTION(1, "mu"); // \
846 // expected-warning {{ignoring 'shared_trylock_function' attribute because its argument is invalid}}
847 int stf_function_bad_5() SHARED_TRYLOCK_FUNCTION(1, muDoublePointer); // \
848 // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
849 int stf_function_bad_6() SHARED_TRYLOCK_FUNCTION(1, umu); // \
850 // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}