================
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fsyntax-only -fsanitize=kcfi -verify %s
+
+#define __cfi_salt(S) __attribute__((cfi_salt(S)))
+
+int foo(int a, int b) __cfi_salt("pepper"); // ok
+int foo(int a, int b) __cfi_salt("pepper"); // ok
+
+typedef int (*bar_t)(void) __cfi_salt("pepper"); // ok
+typedef int (*bar_t)(void) __cfi_salt("pepper"); // ok
+
+#if 0
+// FIXME: These should fail.
+int b(void) __cfi_salt("salt 'n") __cfi_salt("pepper");
+bar_t bar_fn __cfi_salt("salt 'n");
+#endif
+
----------------
bwendling wrote:I changed it to a `TypeAttr`, which is more in line with how I think the attribute should act. https://github.com/llvm/llvm-project/pull/141846 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
