aaron.ballman requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:5210
@@ +5209,3 @@
+static void handleOpenCLNoSVMAttr(Sema &S, Decl *D, const AttributeList &Attr) 
{
+  if (!S.LangOpts.OpenCL) {
+    S.Diag(Attr.getLoc(), diag::warn_unknown_attribute_ignored)
----------------
Please use the language option feature in tabelgen as in your previous patch 
instead of performing this work manually. We want use of the attribute to 
provide a different diagnostic in this case because the attribute *isn't* 
unknown, it simply doesn't apply under the compilation target (and hence is 
ignored).

================
Comment at: lib/Sema/SemaDeclAttr.cpp:5218
@@ +5217,3 @@
+        << Attr.getName() << "2.0" << 0;
+}
+
----------------
This should have an else clause telling the user that the attribute is being 
ignored; silently accepting it and then not performing the semantics of the 
attribute will be confusing behavior for most users. It might not be a bad idea 
to also have the diagnostic tell the user that the attribute has been 
deprecated and is removed in OpenCL 2.1.


http://reviews.llvm.org/D17861



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

Reply via email to