[clang] [clang][ptrauth] add support for options parameter to __ptrauth (PR #136828)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 02:03:27 PDT 2025
================
@@ -8350,14 +8350,16 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr,
/// Handle the __ptrauth qualifier.
static void HandlePtrAuthQualifier(ASTContext &Ctx, QualType &T,
const ParsedAttr &Attr, Sema &S) {
-
- assert((Attr.getNumArgs() > 0 && Attr.getNumArgs() <= 3) &&
- "__ptrauth qualifier takes between 1 and 3 arguments");
+ assert((Attr.getNumArgs() > 0 && Attr.getNumArgs() <= 4) &&
+ "__ptrauth qualifier takes between 1 and 4 arguments");
+ StringRef AttrName = Attr.getAttrName()->getName();
----------------
ojhunt wrote:
`AttrName` is used because the diagnostics need the actual attribute name, and there's a future PR to add the `__ptrauth_restricted_intptr` qualifier which means it is not a constant. We can remove `AttrName` now, but it is immediately needed in the next PR.
https://github.com/llvm/llvm-project/pull/136828
More information about the cfe-commits
mailing list