[clang] [clang][SYCL] Strip references from generated kernel argument types (PR #186788)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 06:44:57 PDT 2026


Fznamznon wrote:

> > Note that we still need to diagnose references in user's kernel arguments since they are explicitly not allowed by SYCL 2020 spec and this task is in TODO list. This patch simply removes references from types written in SYCL Runtime library.
> 
> Is libsycl supposed to pass references to [[clang::sycl_kernel_entry_point]]-attributed function? If no, I think it's worth adding a warning about type mutation to inform libsycl developers.

Yes, this is expected to be a valid scenario. This will be done to avoid additional copies of kernel object when transferring it to kernel setting API (i.e. `clSetKernelArg` in OpenCL terms), so I would avoid a warning here.

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


More information about the cfe-commits mailing list