[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:47:35 PDT 2026


================
@@ -650,7 +650,7 @@ OutlinedFunctionDecl *BuildSYCLKernelEntryPointOutline(Sema &SemaRef,
   for (ParmVarDecl *PVD : FD->parameters()) {
     ImplicitParamDecl *IPD = ImplicitParamDecl::Create(
         SemaRef.getASTContext(), OFD, SourceLocation(), PVD->getIdentifier(),
-        PVD->getType(), ImplicitParamKind::Other);
+        PVD->getType().getNonReferenceType(), ImplicitParamKind::Other);
----------------
Fznamznon wrote:

I don't have a strong preference here, right now we are copying the original function's body so I don't expect side effects from stripping the qualifiers but I tend to agree with @tahonermann since he is the original author of the approach we're currently doing for SYCL here.

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


More information about the cfe-commits mailing list