[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 08:03:08 PDT 2024
================
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD,
if (LangOpts.OpenMP)
OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD);
+ if (LangOpts.isSYCL() && NewFD->hasAttr<SYCLKernelEntryPointAttr>() &&
+ !NewFD->isInvalidDecl() && !NewFD->isDependentContext())
----------------
erichkeane wrote:
Since we are checking this here, then doing the asserts... I think we should make `register...` tolerant of invalid/depedendent decls and have it just immediately return rather than asserting.
https://github.com/llvm/llvm-project/pull/111389
More information about the cfe-commits
mailing list