[clang] [Clang][attr] Add 'kcfi_salt' attribute (PR #141846)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 1 04:17:17 PDT 2025
================
@@ -3929,6 +3929,14 @@ def CFICanonicalJumpTable : InheritableAttr {
let SimpleHandler = 1;
}
+def CFISalt : DeclOrTypeAttr {
+ let Spellings = [Clang<"cfi_salt">];
+ let Args = [StringArgument<"Salt">];
+ let Subjects = SubjectList<[Function, Field, Var, TypedefName], ErrorDiag>;
----------------
AaronBallman wrote:
I would expect those cases to work, at least with the `[[]]` spelling because that applies the attribute to the type spelled immediately on its left. Those should both resolve to `fp_t __cfi_salt` aka `int (*)(void) __cfi_salt`
https://github.com/llvm/llvm-project/pull/141846
More information about the cfe-commits
mailing list