On 12/12/2013 21:40, Dmitri Gribenko wrote:
On Thu, Dec 12, 2013 at 1:23 PM, Alp Toker <[email protected]> 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

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to