[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 11:16:47 PST 2025


================
@@ -980,6 +980,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error<
   "%select{subtraction|addition}0 of address-of-label expressions is not "
   "supported with ptrauth indirect gotos">;
 
+// __ptrauth qualifier
+def err_ptrauth_qualifier_invalid : Error<
+  "%select{return types|parameter types|properties}1 may not be qualified with __ptrauth; type is %0">;
+def err_ptrauth_qualifier_cast : Error<
+  "cast types may not be qualified with __ptrauth; type is %0">;
+def err_ptrauth_qualifier_nonpointer : Error<
+  "__ptrauth qualifier may only be applied to pointer types; type here is %0">;
+def err_ptrauth_qualifier_redundant : Error<
+  "type %0 is already %1-qualified">;
+def err_ptrauth_qualifier_bad_arg_count : Error<
+  "%0 qualifier must take between 1 and 3 arguments">;
----------------
ahatanak wrote:

No, we don't need it here yet. We will need it when we add support for another qualifier.

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


More information about the cfe-commits mailing list