[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 23 06:10:54 PDT 2025


================
@@ -1641,6 +1641,13 @@ def DeviceKernel : DeclOrTypeAttr {
 }];
 }
 
+def SYCLExternal : InheritableAttr {
+  let Spellings = [Clang<"sycl_external">];
----------------
erichkeane wrote:

```suggestion
  let Spellings = [CXX11<"sycl_external">];
```

Alternatively:

```suggestion
  let Spellings = [CXX11<"sycl_external">, C23<"sycl_external">];
```

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


More information about the cfe-commits mailing list