================
@@ -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>;
----------------
bwendling wrote:

> With your latest changes to use `TypeAttr`, that will never apply to a 
> declaration and so I think the `Subjects` list should be `FunctionLike` 
> (only) because it applies to either function types or function pointer types.

That limits some uses. @kees, is it okay to abandon these constructs?

```
typedef int (*fp_t)(void);

struct foo {
  fp_t __cfi_salt func;
};

void bar(fp_t __cfi_salt func) {}
```

https://github.com/llvm/llvm-project/pull/141846
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to