[clang] [SYCL] Basic diagnostics for the sycl_kernel_entry_point attribute. (PR #120327)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 23 21:42:26 PST 2024
================
@@ -12408,6 +12408,29 @@ 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 kernel entry point diagnostics
+def err_sycl_entry_point_invalid : Error<
+ "'sycl_kernel_entry_point' attribute cannot be applied to a"
+ " %select{non-static member|variadic|deleted|defaulted|constexpr|consteval|"
+ "noreturn|coroutine}0 function">;
----------------
tahonermann wrote:
Done. I avoided the additional `%select` by duplicating " function" for the relevant cases. I also changed the wording for the noreturn case from "no return function" to "function declared with the 'noreturn' attribute".
https://github.com/llvm/llvm-project/pull/120327
More information about the cfe-commits
mailing list