jlebar added inline comments.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:3620-3629
@@ -3619,2 +3619,12 @@
}
+ if (const auto *Method = dyn_cast<CXXMethodDecl>(FD)) {
+ if (Method->isInstance()) {
+ S.Diag(Method->getLocStart(), diag::err_kern_is_nonstatic_method)
+ << Method;
+ return;
+ }
+ S.Diag(Method->getLocStart(), diag::warn_kern_is_method) << Method;
+ }
+ if (FD->isInlineSpecified())
+ S.Diag(FD->getLocStart(), diag::warn_kern_is_inline) << FD;
----------------
tra wrote:
> Perhaps we should emit diagnostics on device side only.
Hm. I don't feel strongly, but since we're talking about __global__ functions,
this seems sort of relevant for both host and device compilation?
http://reviews.llvm.org/D16261
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits