================
@@ -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:

> Searching for "can only" in `DiagnosticSemaKinds.td` doesn't suggest a 
> consistent formulation. There are quite a few examples that match the 
> currently proposed spelling.

We are consistently inconsistent :) 
> 
> If "attribute" is added after `sycl_external`, then I would suggest adding 
> "the" before it; "the 'sycl_external' attribute ...".
> 

Agreed.

> We probably should use `'clang::sycl_external'` for consistency with 
> diagnostics that use substitution to provide the attribute name; see the "... 
> attribute ignored" diagnostics for example.

Even better, I'd probably still wrap it in `[[` and `]]` to make it clear what 
we're talking about.



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

Reply via email to