tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.

Small diags not. LGTM otherwise.


================
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;
 
----------------
Perhaps we should emit diagnostics on device side only.


http://reviews.llvm.org/D16261



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to