[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 22:29:28 PDT 2026


================
@@ -16352,6 +16352,32 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D,
 
   maybeAddDeclWithEffects(FD);
 
+  if (FD && !FD->isInvalidDecl() && FD->hasAttr<SYCLKernelEntryPointAttr>() &&
----------------
shafik wrote:

@tahonermann above this check we unconditionally dereference `FD` many times. I believe this check is 

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


More information about the cfe-commits mailing list