================
@@ -15978,6 +15988,24 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt
*Body,
CheckCoroutineWrapper(FD);
}
+ // Diagnose invalid SYCL kernel entry point function declarations.
+ if (FD && !FD->isInvalidDecl() && !FD->isTemplated() &&
----------------
erichkeane wrote:
Why `isTemplated`? All of these things look like rules you can check even on a
dependent function, right? Also, 'isTemplated' just means one of its parents is
at template, so in the case of a 'friend' this could actually be
defined/declared even without the template being instantiated.
https://github.com/llvm/llvm-project/pull/120327
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits