r229636 - Sema: partially address post-commit comments
Saleem Abdulrasool
compnerd at compnerd.org
Tue Feb 17 20:33:26 PST 2015
Author: compnerd
Date: Tue Feb 17 22:33:26 2015
New Revision: 229636
URL: http://llvm.org/viewvc/llvm-project?rev=229636&view=rev
Log:
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.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=229636&r1=229635&r2=229636&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Feb 17 22:33:26 2015
@@ -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<
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=229636&r1=229635&r2=229636&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Tue Feb 17 22:33:26 2015
@@ -4258,8 +4258,7 @@ static void handleDeprecatedAttr(Sema &S
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);
}
More information about the cfe-commits
mailing list