Issue |
154281
|
Summary |
[Clang] Thread safety doesn't allow annotating multiple standard library features
|
Labels |
clang:frontend
|
Assignees |
|
Reporter |
philnik777
|
The current thread safety annotation attributes don't cover the full standard library surface, which is quite unfortunate. Currently the following features don't have any annotations in libc++:
- `recursive_mutex`
- `timed_mutex`
- `recursive_timed_mutex`
- `std::try_lock`
- `scoped_lock` with more than one mutex
- `shared_lock`
- `unique_lock`
Some of them can probably be annotated today, but at least some of them require new attributes to support properly. I also noticed that `shared_mutex` and `shared_timed_mutex` do have annotations, but use `[[clang::capability]]` while there is also `[[clang::shared_capability]]`. Should they be changed to use the `shared_` annotation instead?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs