aaron.ballman added a comment.

In D72635#1911495 <https://reviews.llvm.org/D72635#1911495>, @aaronpuchert 
wrote:

> @aaron.ballman, I've just noted that one of the `-Wthread-safety-attributes` 
> warnings says 
> <https://clang.llvm.org/docs/DiagnosticsReference.html#wthread-safety-attributes>
>
> > //A// attribute can only be applied in a context annotated with 
> > ‘capability(“mutex”)’ attribute
>
> This should be changed then, right? We never enforced the name anyway.


Yeah, something needs to change here. For this diagnostic specifically, we care 
that the type is a capability-annotated type and if it's not, we want to 
diagnose. However, do we want to diagnose when the capability strings are 
different? e.g.,

  typedef int __attribute__((capability("role"))) ThreadRole;
  typedef int __attribute__((capability("noodle"))) Noodle;
  
  Noodle N;
  ThreadRole Data __attribute__((acquired_before(N)));


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72635/new/

https://reviews.llvm.org/D72635



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to