Home | History | Annotate | Download | only in SemaCXX

Lines Matching defs:GUARDED_BY

5 #define GUARDED_BY(x)       __attribute__ ((guarded_by(x)))
302 #if !__has_attribute(guarded_by)
303 #error "Should support guarded_by attribute"
308 int gb_var_arg GUARDED_BY(mu1);
310 int gb_var_args __attribute__((guarded_by(mu1, mu2))); // \
311 // expected-error {{'guarded_by' attribute takes one argument}}
313 int gb_var_noargs __attribute__((guarded_by)); // \
314 // expected-error {{'guarded_by' attribute takes one argument}}
318 int gb_field_noargs __attribute__((guarded_by)); // \
319 // expected-error {{'guarded_by' attribute takes one argument}}
320 int gb_field_args GUARDED_BY(mu1);
323 class GUARDED_BY(mu1) GB { // \
324 // expected-warning {{'guarded_by' attribute only applies to fields and global variables}}
327 void gb_function() GUARDED_BY(mu1); // \
328 // expected-warning {{'guarded_by' attribute only applies to fields and global variables}}
330 void gb_function_params(int gv_lvar GUARDED_BY(mu1)); // \
331 // expected-warning {{'guarded_by' attribute only applies to fields and global variables}}
334 int x GUARDED_BY(mu1) = y; // \
335 // expected-warning {{'guarded_by' attribute only applies to fields and global variables}}
342 int gb_var_arg_1 GUARDED_BY(muWrapper.mu);
343 int gb_var_arg_2 GUARDED_BY(muDoubleWrapper.muWrapper->mu);
344 int gb_var_arg_3 GUARDED_BY(muWrapper.getMu());
345 int gb_var_arg_4 GUARDED_BY(*muWrapper.getMuPointer());
346 int gb_var_arg_5 GUARDED_BY(&mu1);
347 int gb_var_arg_6 GUARDED_BY(muRef);
348 int gb_var_arg_7 GUARDED_BY(muDoubleWrapper.getWrapper()->getMu());
349 int gb_var_arg_8 GUARDED_BY(muPointer);
353 int gb_var_arg_bad_1 GUARDED_BY(1); // \
354 // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'int'}}
355 int gb_var_arg_bad_2 GUARDED_BY("mu"); // \
356 // expected-warning {{ignoring 'guarded_by' attribute because its argument is invalid}}
357 int gb_var_arg_bad_3 GUARDED_BY(muDoublePointer); // \
358 // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'class Mutex **'}}
359 int gb_var_arg_bad_4 GUARDED_BY(umu); // \
360 // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class UnlockableMu'}}
1276 int a GUARDED_BY(gmu);
1277 int b GUARDED_BY(mu);
1278 int c GUARDED_BY(this->mu);
1325 int GUARDED_BY(mu_) a;
1326 int GUARDED_BY(mu_) b, c;
1339 int a GUARDED_BY(mu);
1340 int b GUARDED_BY(fooMuStatic);
1349 int a GUARDED_BY(fooMu);
1359 int testEmptyAttribute GUARDED_BY("");
1372 int a GUARDED_BY(&Graph::mu_);
1402 int b GUARDED_BY(smu_);
1428 int a GUARDED_BY(mu1_);
1429 int b GUARDED_BY(mu2_);
1430 int c GUARDED_BY(mu3_); // \
1431 // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class InheritanceTest::Derived3'}}
1460 int a GUARDED_BY(mu);
1462 static int si GUARDED_BY(mu); // \