]> granicus.if.org Git - clang/commitdiff
Sema: partially address post-commit comments
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 18 Feb 2015 04:33:26 +0000 (04:33 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 18 Feb 2015 04:33:26 +0000 (04:33 +0000)
Un-parameterize the warning as there is exactly one attribute added in C++14.
Partially addresses post-commit review comments from Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229636 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp

index d979fe1cbe12e60b2aeb8482e912327139e0c273..60c26212e7f60c26978b81e2d8d81ef28ab75ab8 100644 (file)
@@ -7233,8 +7233,8 @@ def err_asm_naked_this_ref : Error<
 def err_asm_naked_parm_ref : Error<
   "parameter references not allowed in naked functions">;
 
-def ext_use_of_attribute_is_a_cxx14_extension : ExtWarn<
-  "use of the %0 attribute is a C++14 extension">, InGroup<CXX14>;
+def ext_deprecated_attr_is_a_cxx14_extension : ExtWarn<
+  "use of the 'deprecated' attribute is a C++14 extension">, InGroup<CXX14>;
 
 // OpenCL warnings and errors.
 def err_invalid_astype_of_different_size : Error<
index 4abe480c52b40979447e0b8d559784d35920820f..c1d0ea641afb54e3a7688405a430c35896b74e10 100644 (file)
@@ -4258,8 +4258,7 @@ static void handleDeprecatedAttr(Sema &S, Decl *D, const AttributeList &Attr) {
   if (!S.getLangOpts().CPlusPlus14)
     if (Attr.isCXX11Attribute() &&
         !(Attr.hasScope() && Attr.getScopeName()->isStr("gnu")))
-      S.Diag(Attr.getLoc(), diag::ext_use_of_attribute_is_a_cxx14_extension)
-          << Attr.getName();
+      S.Diag(Attr.getLoc(), diag::ext_deprecated_attr_is_a_cxx14_extension);
 
   handleAttrWithMessage<DeprecatedAttr>(S, D, Attr);
 }