https://github.com/s-barannikov created 
https://github.com/llvm/llvm-project/pull/243446

The three enum parameters of 'ptrauth_vtable_pointer' were declared with
IsString set, but its custom handler requires *identifier* arguments in
those positions and rejects anything else.

There is no observable behavioral difference since the attribute does
not take the generic path where IsString does matter.

Found by observation.


>From 389a0209050ccacbe65b6b2475d5eeba466e7fb1 Mon Sep 17 00:00:00 2001
From: Sergei Barannikov <[email protected]>
Date: Tue, 17 Nov 2026 14:58:50 +0300
Subject: [PATCH] [clang] Correct the argument declaration of
 'ptrauth_vtable_pointer'

The three enum parameters of 'ptrauth_vtable_pointer' were declared with
IsString set, but its custom handler requires *identifier* arguments in
those positions and rejects anything else.
There is no observable behavioral difference since the attribute does
not take the common path where IsString does matter.
Found by observation.
---
 clang/include/clang/Basic/Attr.td | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index b9896de61df54e..8fd6ef3abf94d0 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -5508,19 +5508,19 @@ def VTablePointerAuthentication : InheritableAttr {
   let Subjects = SubjectList<[CXXRecord]>;
   let Documentation = [Undocumented];
   let StrictEnumParameters = 1;
-  let Args = [EnumArgument<"Key", "VPtrAuthKeyType", /*is_string=*/ true,
+  let Args = [EnumArgument<"Key", "VPtrAuthKeyType", /*is_string=*/ false,
                 ["default_key", "no_authentication", "process_dependent",
                  "process_independent"],
                 ["DefaultKey", "NoKey", "ProcessDependent",
                  "ProcessIndependent"]>,
               EnumArgument<"AddressDiscrimination", 
"AddressDiscriminationMode",
-                /*is_string=*/ true,
+                /*is_string=*/ false,
                 ["default_address_discrimination", "no_address_discrimination",
                  "address_discrimination"],
                 ["DefaultAddressDiscrimination", "NoAddressDiscrimination",
                  "AddressDiscrimination"]>,
               EnumArgument<"ExtraDiscrimination", "ExtraDiscrimination",
-                /*is_string=*/ true,
+                /*is_string=*/ false,
                 ["default_extra_discrimination", "no_extra_discrimination",
                  "type_discrimination", "custom_discrimination"],
                 ["DefaultExtraDiscrimination", "NoExtraDiscrimination",

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to