Home | History | Annotate | Download | only in SemaCXX

Lines Matching refs:EXCLUSIVE_TRYLOCK_FUNCTION

15 #define EXCLUSIVE_TRYLOCK_FUNCTION(...) __attribute__ ((exclusive_trylock_function(__VA_ARGS__)))
33 bool TryLock() EXCLUSIVE_TRYLOCK_FUNCTION(true);
710 #if !__has_attribute(exclusive_trylock_function)
711 #error "Should support exclusive_trylock_function attribute"
717 void etf_function() __attribute__((exclusive_trylock_function)); // \
718 // expected-error {{'exclusive_trylock_function' attribute takes at least 1 argument}}
720 void etf_function_args() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu2);
722 void etf_function_arg() EXCLUSIVE_TRYLOCK_FUNCTION(1);
724 int etf_testfn(int y) EXCLUSIVE_TRYLOCK_FUNCTION(1);
727 int x EXCLUSIVE_TRYLOCK_FUNCTION(1) = y; // \
728 // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
732 int etf_test_var EXCLUSIVE_TRYLOCK_FUNCTION(1); // \
733 // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
737 int test_field EXCLUSIVE_TRYLOCK_FUNCTION(1); // \
738 // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
739 void test_method() EXCLUSIVE_TRYLOCK_FUNCTION(1);
742 class EXCLUSIVE_TRYLOCK_FUNCTION(1) EtfTestClass { // \
743 // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
746 void etf_fun_params(int lvar EXCLUSIVE_TRYLOCK_FUNCTION(1)); // \
747 // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
752 int etf_function_1() EXCLUSIVE_TRYLOCK_FUNCTION(1, muWrapper.mu);
753 int etf_function_2() EXCLUSIVE_TRYLOCK_FUNCTION(1, muDoubleWrapper.muWrapper->mu);
754 int etf_function_3() EXCLUSIVE_TRYLOCK_FUNCTION(1, muWrapper.getMu());
755 int etf_function_4() EXCLUSIVE_TRYLOCK_FUNCTION(1, *muWrapper.getMuPointer());
756 int etf_function_5() EXCLUSIVE_TRYLOCK_FUNCTION(1, &mu1);
757 int etf_function_6() EXCLUSIVE_TRYLOCK_FUNCTION(1, muRef);
758 int etf_function_7() EXCLUSIVE_TRYLOCK_FUNCTION(1, muDoubleWrapper.getWrapper()->getMu());
759 int etf_functetfn_8() EXCLUSIVE_TRYLOCK_FUNCTION(1, muPointer);
760 int etf_function_9() EXCLUSIVE_TRYLOCK_FUNCTION(true);
764 int etf_function_bad_1() EXCLUSIVE_TRYLOCK_FUNCTION(mu1); // \
765 // expected-error {{'exclusive_trylock_function' attribute requires parameter 1 to be int or bool}}
766 int etf_function_bad_2() EXCLUSIVE_TRYLOCK_FUNCTION("mu"); // \
767 // expected-error {{'exclusive_trylock_function' attribute requires parameter 1 to be int or bool}}
768 int etf_function_bad_3() EXCLUSIVE_TRYLOCK_FUNCTION(muDoublePointer); // \
769 // expected-error {{'exclusive_trylock_function' attribute requires parameter 1 to be int or bool}}
771 int etf_function_bad_4() EXCLUSIVE_TRYLOCK_FUNCTION(1, "mu"); // \
772 // expected-warning {{ignoring 'exclusive_trylock_function' attribute because its argument is invalid}}
773 int etf_function_bad_5() EXCLUSIVE_TRYLOCK_FUNCTION(1, muDoublePointer); // \
774 // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
775 int etf_function_bad_6() EXCLUSIVE_TRYLOCK_FUNCTION(1, umu); // \
776 // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}