[clang] Thread Safety Analysis: Support attributes on function pointers (PR #191187)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 27 06:19:13 PDT 2026
================
@@ -300,6 +300,12 @@ Attribute Changes in Clang
sound because any writer must hold all capabilities, so holding any one
prevents concurrent writes.
+- :doc:`ThreadSafetyAnalysis` attributes like ``acquire_capability``,
+ ``release_capability``, ``requires_capability``, ``locks_excluded``,
+ ``try_acquire_capability``, and ``assert_capability`` can now be applied to
+ function pointer variables and fields. The analysis checks calls through
----------------
AaronBallman wrote:
And member function pointers in C++? What about calls through blocks?
https://github.com/llvm/llvm-project/pull/191187
More information about the cfe-commits
mailing list