[clang] Add sycl_external attribute (PR #140282)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Tue May 27 08:22:42 PDT 2025


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

Shouldn't that be
```suggestion
  if (LangOpts.SYCLIsDevice &&
       !D->hasAttr<SYCLKernelEntryPointAttr>() && !D->hasAttr<SYCLExternalAttr>())
```

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


More information about the cfe-commits mailing list