================
@@ -315,43 +315,53 @@ void
SemaSYCL::CheckSYCLEntryPointFunctionDecl(FunctionDecl *FD) {
}
}
+ if (isa<CXXConstructorDecl>(FD)) {
+ Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
+ << SKEPAttr << /*constructor*/ 3;
+ SKEPAttr->setInvalidAttr();
+ }
+ if (isa<CXXDestructorDecl>(FD)) {
+ Diag(SKEPAttr->getLocation(), diag::err_sycl_entry_point_invalid)
+ << SKEPAttr << /*destructor*/ 4;
+ SKEPAttr->setInvalidAttr();
+ }
if (const auto *MD = dyn_cast<CXXMethodDecl>(FD)) {
- if (!MD->isStatic()) {
+ if (MD->isExplicitObjectMemberFunction()) {
----------------
erichkeane wrote:
Why does this patch now allow new 'types' of functions? IMO, this should be a
separate patch in a quite sizable patch.
That said, allowing member functions is interesting, but I don't see why we
would reject explicit-object-member-functions, they are effectively static?
https://github.com/llvm/llvm-project/pull/152403
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits