[clang] [clang][SYCL] Implement address space attributes for SYCL (PR #200849)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 15 23:21:40 PDT 2026


================
@@ -8978,6 +8982,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
     NewVD->setType(T);
   }
 
+  // The SYCL address space attributes may only be applied to the object type
+  // of an object pointer or object reference type.
----------------
tahonermann wrote:

Per the discussion on the wording of the diagnostic, let's update this comment too.

```suggestion
  // The top-level type of a variable declaration cannot have a SYCL address space qualifier.
```

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


More information about the cfe-commits mailing list