[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 09:35:16 PDT 2025
================
@@ -12251,6 +12264,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
if (NewFD->hasAttr<SYCLKernelEntryPointAttr>())
SYCL().CheckSYCLEntryPointFunctionDecl(NewFD);
+ if (NewFD->hasAttr<SYCLExternalAttr>())
+ SYCL().CheckSYCLExternalFunctionDecl(NewFD);
----------------
schittir wrote:
The suggested change to avoid diagnosing the abovementioned case affects cases even with explicit template specializations, such as the two preceding it in the test file. Using the canonical decls doesn't solve the problem. Further investigation is needed. I will leave the FIXME as it is for this case for follow up in a subsequent PR.
https://github.com/llvm/llvm-project/pull/140282
More information about the cfe-commits
mailing list