r197179 - Unify type trait parsing
Alp Toker
alp at nuanti.com
Fri Dec 13 04:55:30 PST 2013
On 12/12/2013 21:40, Dmitri Gribenko wrote:
> On Thu, Dec 12, 2013 at 1:23 PM, Alp Toker <alp at nuanti.com> wrote:
>> Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=197179&r1=197178&r2=197179&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
>> +++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Thu Dec 12 15:23:03 2013
>> @@ -777,6 +777,11 @@ def warn_availability_and_unavailable :
>> def err_type_safety_unknown_flag : Error<
>> "invalid comparison flag %0; use 'layout_compatible' or 'must_be_null'">;
>>
>> +// Type traits
>> +def err_type_trait_arity : Error<
>> + "type trait requires %0%select{| or more}1 argument%select{|s}2; have "
>> + "%3 argument%s3">;
> Clang diagnostics support %plural, see
> http://clang.llvm.org/docs/InternalsManual.html.
Thanks for the observation.
In this case the message was just moved verbatim from Sema to Parse.
The bigger problem with this diag is that it has a different wording to
other argument length messages:
|traits.cpp:18:51: error: type trait requires 1 argument; have 2 arguments||
||
||traits.cpp:23:40: error: too few template arguments for class template
'is_nothrow_constructible'||
||
||traits.cpp:13:6: note: candidate function not viable: requires 1
argument, but 2 were provided|
Instead of keeping these inconsistencies I'd like to pick one style and
make the others consistent during the 3.5 iteration.
Alp.
>
> Dmitri
>
--
http://www.nuanti.com
the browser experts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131213/023de9af/attachment.html>
More information about the cfe-commits
mailing list