Skip to content

Commit ce7eb72

Browse files
committed
Thread safety analysis: Reword warning after D72635
We allow arbitrary names for capabilities now, and the name didn't play a role for this anyway.
1 parent 8f5beb4 commit ce7eb72

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3336,7 +3336,7 @@ def warn_thread_attribute_argument_not_lockable : Warning<
33363336
InGroup<ThreadSafetyAttributes>, DefaultIgnore;
33373337
def warn_thread_attribute_decl_not_lockable : Warning<
33383338
"%0 attribute can only be applied in a context annotated "
3339-
"with 'capability(\"mutex\")' attribute">,
3339+
"with 'capability' attribute">,
33403340
InGroup<ThreadSafetyAttributes>, DefaultIgnore;
33413341
def warn_thread_attribute_decl_not_pointer : Warning<
33423342
"%0 only applies to pointer types; type here is %1">,

clang/test/SemaCXX/warn-thread-safety-parsing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ Mutex aa_var_arg_bad_3 ACQUIRED_AFTER(muDoublePointer); // \
496496
Mutex aa_var_arg_bad_4 ACQUIRED_AFTER(umu); // \
497497
// expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute}}
498498
UnlockableMu aa_var_arg_bad_5 ACQUIRED_AFTER(mu_aa); // \
499-
// expected-warning {{'acquired_after' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}}
499+
// expected-warning {{'acquired_after' attribute can only be applied in a context annotated with 'capability' attribute}}
500500

501501
//-----------------------------------------//
502502
// Acquired Before (ab)
@@ -559,7 +559,7 @@ Mutex ab_var_arg_bad_3 ACQUIRED_BEFORE(muDoublePointer); // \
559559
Mutex ab_var_arg_bad_4 ACQUIRED_BEFORE(umu); // \
560560
// expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute}}
561561
UnlockableMu ab_var_arg_bad_5 ACQUIRED_BEFORE(mu_ab); // \
562-
// expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}}
562+
// expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'capability' attribute}}
563563

564564

565565
//-----------------------------------------//

0 commit comments

Comments
 (0)