[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 11 10:47:01 PDT 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/67095/clang at github.com>
================
@@ -8141,6 +8141,16 @@ static void handleRequiresCapabilityAttr(Sema &S, Decl *D,
if (!AL.checkAtLeastNumArgs(S, 1))
return;
+ // We allow this on function declaration as well as
+ // variable declarations of function pointer type.
+ if (!D->isFunctionPointerType() && !isa<FunctionDecl>(D)) {
----------------
AaronBallman wrote:
Once the Subjects list is corrected, I believe this code can be removed.
https://github.com/llvm/llvm-project/pull/67095
More information about the cfe-commits
mailing list