================
@@ -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())
----------------
tahonermann wrote:

This is not the first such case. A few existing examples are listed below. More 
examples can be found in Serialization.
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/AST/ExternalASTSource.cpp#L121
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/Basic/ProfileList.cpp#L62
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/Basic/SanitizerSpecialCaseList.cpp#L36
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/Basic/SourceManager.cpp#L674
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/CodeGen/CoverageMappingGen.cpp#L1030-L1031
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/CodeGen/CoverageMappingGen.cpp#L1050-L1051
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/CodeGen/LinkInModulesPass.cpp#L30
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/CodeGen/ObjectFilePCHContainerWriter.cpp#L277
- 
https://github.com/llvm/llvm-project/blob/b1320d36339e38b073088fd45013a3c692adb301/clang/lib/Interpreter/Interpreter.cpp#L426-L428

https://github.com/llvm/llvm-project/pull/111389
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to