[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 13:00:28 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:

And I'm saying that is SUCH a divergence from the standard behavior of the compiler and our current coding standards, that I don't want to do it the first time here.

We likely want some sort of RFC for that which audits all current asserts/unreachables/etc, and figures out which of those should be `report_fatal_error`, and a comprehensive patch to fix all/most of them at once.

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


More information about the cfe-commits mailing list