[all-commits] [llvm/llvm-project] 9c73eb: Merge similar Clang Thread Safety attributes (#135...
Aaron Puchert via All-commits
all-commits at lists.llvm.org
Tue Apr 15 14:21:55 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9c73eba8aa17cb7ca4248ab1c7f67ea7ec9b50b1
https://github.com/llvm/llvm-project/commit/9c73eba8aa17cb7ca4248ab1c7f67ea7ec9b50b1
Author: Aaron Puchert <aaronpuchert at alice-dsl.net>
Date: 2025-04-15 (Tue, 15 Apr 2025)
Changed paths:
M clang/include/clang/Basic/Attr.td
M clang/lib/AST/ASTImporter.cpp
M clang/lib/Analysis/ThreadSafety.cpp
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/lib/Sema/SemaDeclCXX.cpp
M clang/test/Sema/attr-capabilities.c
M clang/unittests/AST/ASTImporterTest.cpp
Log Message:
-----------
Merge similar Clang Thread Safety attributes (#135561)
Some of the old lock-based and new capability-based spellings behave
basically in the same way, so merging them simplifies the code
significantly.
There are two minor functional changes: we only warn (instead of an
error) when the try_acquire_capability attribute is used on something
else than a function. The alternative would have been to produce an
error for the old spelling, but we seem to only warn for all function
attributes, so this is arguably more consistent.
The second change is that we also check the first argument (which is the
value returned for a successful try-acquire) for `this`. But from what I
can tell, this code is defunct anyway at the moment (see #31414).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list