Author: Sergei Barannikov
Date: 2026-11-21T13:38:48Z
New Revision: c9befbbe32a9d1a5a76237663277235f87aec596

URL: 
https://github.com/llvm/llvm-project/commit/c9befbbe32a9d1a5a76237663277235f87aec596
DIFF: 
https://github.com/llvm/llvm-project/commit/c9befbbe32a9d1a5a76237663277235f87aec596.diff

LOG: [clang] Correct the argument declaration of 'ptrauth_vtable_pointer' in 
Attrs.td (#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 would matter.

Found by observation.

Added: 
    

Modified: 
    clang/include/clang/Basic/Attr.td

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/Attr.td 
b/clang/include/clang/Basic/Attr.td
index d68e3253628d8..35afd9d197cfd 100644
--- a/clang/include/clang/Basic/Attr.td
+++ b/clang/include/clang/Basic/Attr.td
@@ -5517,19 +5517,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