[clang] Add sycl_external attribute (PR #140282)

via cfe-commits cfe-commits at lists.llvm.org
Mon May 19 08:31:20 PDT 2025


================
@@ -12909,6 +12909,9 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
   if (D->hasAttr<WeakRefAttr>())
     return false;
 
+  if (LangOpts.SYCLIsDevice && !D->hasAttr<SYCLKernelEntryPointAttr>())
+    return false;
----------------
schittir wrote:

Yes, indeed. I left that one out of this draft because adding that check caused three additional failures than those caused by the check for KernelEntryPointAttr alone. I didn't expect you to review it, but I should have labeled it clearly, just in case. Thank you!

https://github.com/llvm/llvm-project/pull/140282


More information about the cfe-commits mailing list