From: Saleem Abdulrasool Date: Wed, 18 Feb 2015 04:33:26 +0000 (+0000) Subject: Sema: partially address post-commit comments X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d9b0013b7a385262962cfae4ba7628d88490c174;p=clang Sema: partially address post-commit comments 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 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index d979fe1cbe..60c26212e7 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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; +def ext_deprecated_attr_is_a_cxx14_extension : ExtWarn< + "use of the 'deprecated' attribute is a C++14 extension">, InGroup; // OpenCL warnings and errors. def err_invalid_astype_of_different_size : Error< diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 4abe480c52..c1d0ea641a 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -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(S, D, Attr); }