[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


================
@@ -4096,7 +4096,7 @@ def AssertCapability : InheritableAttr {
                    Clang<"assert_shared_capability", 0>,
                    GNU<"assert_exclusive_lock">,
                    GNU<"assert_shared_lock">];
-  let Subjects = SubjectList<[Function]>;
+  let Subjects = SubjectList<[Function, NonParmVar, Field]>;
----------------
AaronBallman wrote:

Why not parameter variables? I would have assumed a parameter variable of function pointer type would be allowed to do this?

https://github.com/llvm/llvm-project/pull/191187


More information about the cfe-commits mailing list