r199053 - Clarify warn_cxx98_compat_attribute diagnostic

Aaron Ballman aaron at aaronballman.com
Sun Jan 12 07:29:15 PST 2014


On Sun, Jan 12, 2014 at 10:18 AM, Alp Toker <alp at nuanti.com> wrote:
> Author: alp
> Date: Sun Jan 12 09:18:06 2014
> New Revision: 199053
>
> URL: http://llvm.org/viewvc/llvm-project?rev=199053&view=rev
> Log:
> Clarify warn_cxx98_compat_attribute diagnostic
>
> Various attribute flavours are supported in C++98. Make it clear that this
> compatibility warning relates specifically to C++11-style generalized
> attributes.
>
> Modified:
>     cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
>     cfe/trunk/test/SemaCXX/cxx98-compat.cpp
>
> Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=199053&r1=199052&r2=199053&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Sun Jan 12 09:18:06 2014
> @@ -517,7 +517,7 @@ def warn_cxx98_compat_nullptr : Warning<
>  def warn_cxx98_compat_alignas : Warning<"'alignas' is incompatible with C++98">,
>    InGroup<CXX98Compat>, DefaultIgnore;
>  def warn_cxx98_compat_attribute : Warning<
> -  "attributes are incompatible with C++98">,
> +  "generalized attributes are incompatible with C++98">,

What are "generalized" attributes? I think it would be better-worded
as "C++11 attributes are incompatible with C++98" (this is more
consistent with other parser diagnostics, as well).

Otherwise, LGTM!

~Aaron



More information about the cfe-commits mailing list