================ @@ -202,6 +202,17 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr &AL) { handleSimpleAttribute<DeviceKernelAttr>(*this, D, AL); } +void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) { + auto *ND = cast<NamedDecl>(D); + if (!ND->isExternallyVisible()) { + Diag(AL.getLoc(), diag::err_sycl_attribute_invalid_linkage) + << AL << !isa<FunctionDecl>(ND); ---------------- tahonermann wrote:
The error diagnostic doesn't specify replacement fields, so the redirection arguments aren't needed. ```suggestion Diag(AL.getLoc(), diag::err_sycl_attribute_invalid_linkage); ``` 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