[cfe-commits] r116415 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/SemaTemplate/temp_arg_nontype.cpp

Douglas Gregor dgregor at apple.com
Wed Oct 13 11:27:55 PDT 2010


Author: dgregor
Date: Wed Oct 13 13:27:55 2010
New Revision: 116415

URL: http://llvm.org/viewvc/llvm-project?rev=116415&view=rev
Log:
Place conversion warnings for non-type template arguments under the
control of -Wconversion, and ignore them by default.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
    cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=116415&r1=116414&r2=116415&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Oct 13 13:27:55 2010
@@ -1430,10 +1430,10 @@
   "of type %1">;
 def warn_template_arg_negative : Warning<
   "non-type template argument with value '%0' converted to '%1' for unsigned "
-  "template parameter of type %2">;
+  "template parameter of type %2">, InGroup<Conversion>, DefaultIgnore;
 def warn_template_arg_too_large : Warning<
   "non-type template argument value '%0' truncated to '%1' for "
-  "template parameter of type %2">;
+  "template parameter of type %2">, InGroup<Conversion>, DefaultIgnore;
 def err_template_arg_no_ref_bind : Error<
   "non-type template parameter of reference type %0 cannot bind to template "
   "argument of type %1">;

Modified: cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp?rev=116415&r1=116414&r2=116415&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp_arg_nontype.cpp Wed Oct 13 13:27:55 2010
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wconversion -verify %s
 template<int N> struct A; // expected-note 5{{template parameter is declared here}}
 
 A<0> *a0;





More information about the cfe-commits mailing list