[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 4 15:48:28 PST 2025
================
@@ -387,8 +397,162 @@ void SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) {
}
}
+ExprResult SemaSYCL::BuildSYCLKernelLaunchIdExpr(FunctionDecl *FD,
+ QualType KNT) {
+ // The current context must be the function definition context to ensure
+ // that name lookup is performed within the correct scope.
+ assert(SemaRef.CurContext == FD);
+
+ // An appropriate source location is required to emit diagnostics if
----------------
tahonermann wrote:
I did come across one case where a source location was being passed to indicate the presence of a `template` keyword used as a disambiguator. In that case, passing a source location resulted in a spurious diagnostic (see [here](https://github.com/llvm/llvm-project/blob/4abaf068067c7870005c29a09f2be991a156ed3e/clang/test/SemaSYCL/sycl-host-kernel-launch.cpp#L23)). I addressed this by (intentionally) passing an invalid source location since the synthesized call expression has no need to reflect use of `template` as a disambiguator.
https://github.com/llvm/llvm-project/pull/152403
More information about the cfe-commits
mailing list