r199053 - Clarify warn_cxx98_compat_attribute diagnostic

Alp Toker alp at nuanti.com
Sun Jan 12 08:46:21 PST 2014


On 12/01/2014 15:29, Aaron Ballman wrote:
> 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).


Hi Aaron,

I'd say it's time to use the more natural name for C++11 attributes 
because the syntax now appears in a published standard. That's the usual 
lifecycle for clang language features moving from experimental to fully 
supported.

As for the name itself, it's the terminology adopted by the C++ 
community and also the name by which we advertise the feature on our own 
C++ status page at http://clang.llvm.org/cxx_status.html:

   Generalized attributes    N2761    Clang 3.3 (1)

There's also a compelling reason _not_ to keep the old experimental 
naming scheme indefinitely -- doing so will cause terminology dissonance 
as other language dialects like ISO C look to adopt the new syntax, 
likewise if we decide to introduce generalized attributes as a clang 
extension to C11 in the meantime.

Alp.


>
> Otherwise, LGTM!
>
> ~Aaron

-- 
http://www.nuanti.com
the browser experts

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140112/afaf41b7/attachment.html>


More information about the cfe-commits mailing list