[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 23 06:10:54 PDT 2025
================
@@ -12908,6 +12908,14 @@ def err_sycl_special_type_num_init_method : Error<
"types with 'sycl_special_class' attribute must have one and only one '__init' "
"method defined">;
+// SYCL external attribute diagnostics
+def err_sycl_attribute_invalid_linkage : Error<
+ "'sycl_external' can only be applied to functions with external linkage">;
----------------
erichkeane wrote:
I'd suggest spelling these differently. Either:
`'sycl_external' attribute`
OR:
`[[sycl_external]]`.
Probably the latter if spellings list is changed above.
https://github.com/llvm/llvm-project/pull/140282
More information about the cfe-commits
mailing list