aaronpuchert wrote: Yeah, it's a tricky question. On one hand there have been previous issues like #42194 (which this would basically address), and it would definitely improve consistency and prevent beginner's mistakes. On the other hand it seems useful to allow adding attributes e.g. to third-party libraries where you don't control the headers.
Perhaps we should introduce such checks, but put them under a subflag of `-Wthread-safety-attributes` to allow opting out of them (even locally via pragmas). And of course it should apply more or less to every thread safety annotation, not just `requires_capability`. https://github.com/llvm/llvm-project/pull/67520 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits