Home | History | Annotate | Download | only in SemaCXX

Lines Matching refs:LOCK_RETURNED

18 #define LOCK_RETURNED(x)    __attribute__ ((lock_returned(x)))
929 #if !__has_attribute(lock_returned)
930 #error "Should support lock_returned attribute"
935 void lr_function() __attribute__((lock_returned)); // \
936 // expected-error {{'lock_returned' attribute takes one argument}}
938 void lr_function_arg() LOCK_RETURNED(mu1);
940 void lr_function_args() __attribute__((lock_returned(mu1, mu2))); // \
941 // expected-error {{'lock_returned' attribute takes one argument}}
943 int lr_testfn(int y) LOCK_RETURNED(mu1);
946 int x LOCK_RETURNED(mu1) = y; // \
947 // expected-warning {{'lock_returned' attribute only applies to functions}}
951 int lr_test_var LOCK_RETURNED(mu1); // \
952 // expected-warning {{'lock_returned' attribute only applies to functions}}
954 void lr_fun_params(int lvar LOCK_RETURNED(mu1)); // \
955 // expected-warning {{'lock_returned' attribute only applies to functions}}
959 int test_field LOCK_RETURNED(mu1); // \
960 // expected-warning {{'lock_returned' attribute only applies to functions}}
961 void test_method() LOCK_RETURNED(mu1);
964 class LOCK_RETURNED(mu1) LrTestClass { // \
965 // expected-warning {{'lock_returned' attribute only applies to functions}}
971 int lr_function_1() LOCK_RETURNED(muWrapper.mu);
972 int lr_function_2() LOCK_RETURNED(muDoubleWrapper.muWrapper->mu);
973 int lr_function_3() LOCK_RETURNED(muWrapper.getMu());
974 int lr_function_4() LOCK_RETURNED(*muWrapper.getMuPointer());
975 int lr_function_5() LOCK_RETURNED(&mu1);
976 int lr_function_6() LOCK_RETURNED(muRef);
977 int lr_function_7() LOCK_RETURNED(muDoubleWrapper.getWrapper()->getMu());
978 int lr_function_8() LOCK_RETURNED(muPointer);
982 int lr_function_bad_1() LOCK_RETURNED(1); // \
983 // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
984 int lr_function_bad_2() LOCK_RETURNED("mu"); // \
985 // expected-warning {{ignoring 'lock_returned' attribute because its argument is invalid}}
986 int lr_function_bad_3() LOCK_RETURNED(muDoublePointer); // \
987 // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
988 int lr_function_bad_4() LOCK_RETURNED(umu); // \
989 // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute}}
1368 static Mutex* get_static_mu() LOCK_RETURNED(&Graph::mu_);