================
Comment at: lib/Sema/SemaDeclAttr.cpp:655-656
@@ +654,4 @@
+  if (!isa<FunctionDecl>(D) && !isa<FunctionTemplateDecl>(D)) {
+    S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
+      << Attr.getName() << ExpectedFunctionOrMethod;
+    return;
----------------
Can we promote this to an error?  There's no existing code that (mis)uses this 
attribute, so there should be no compatibility concerns.

Please also add tests for this warning or error, and for 
checkAttributeNumArgs() condition above.


http://llvm-reviews.chandlerc.com/D390
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to