[clang] [clang][SYCL] Implement address space attributes for SYCL (PR #200849)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 10 06:49:10 PDT 2026
================
@@ -13537,6 +13537,9 @@ def err_sycl_special_type_num_init_method : Error<
"method defined">;
def err_sycl_device_invalid_target : Error<
"%0 is not a supported SYCL device target">;
+def err_sycl_address_space_qualified_object : Error<
+ "'%0' attribute may only be applied to the object type of an object pointer "
----------------
elizabethandrews wrote:
I added a couple of additional function pointer tests. I did not change the diagnostic yet.
`%0' attribute cannot appear in the top-level type of a variable declaration` reads a bit odd to me but I am not opposed to it.
I also considered `"'%0' attribute may only be applied to the pointee of a pointer or the referent of a reference"` . This however does not accurately catch the function pointer case but I don't know if that matters since the generic diagnostic fires for it.
https://github.com/llvm/llvm-project/pull/200849
More information about the cfe-commits
mailing list