================
@@ -336,6 +336,40 @@ Improvements to Clang's diagnostics
local variables passed to function calls using the ``[[clang::musttail]]``
attribute.
+- The Thread Safety Analysis (#GH110523) now supports passing scoped
capabilities into functions:
+ an attribute on the scoped capability parameter indicates both the expected
associated capabilities and,
+ like in the case of attributes on the function declaration itself, their
state before and after the call.
+
+ .. code-block:: c++
+
+ #include "mutex.h"
+
+ class MutexUnlocker {
+ Mutex* mu;
+
+ public:
+ MutexUnlocker(Mutex* m) RELEASE(m) : mu(m) { mu->Unlock(); }
+ ~MutexUnlocker() ACQUIRE(mu) { mu->Lock(); }
+ };
----------------
aaronpuchert wrote:
This seems to be unused, did you add it by accident?
https://github.com/llvm/llvm-project/pull/110523
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits