]> granicus.if.org Git - clang/commitdiff
Place conversion warnings for non-type template arguments under the
authorDouglas Gregor <dgregor@apple.com>
Wed, 13 Oct 2010 18:27:55 +0000 (18:27 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 13 Oct 2010 18:27:55 +0000 (18:27 +0000)
control of -Wconversion, and ignore them by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116415 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/SemaTemplate/temp_arg_nontype.cpp

index b6c15153345359716a472f3af5273e1f9b566de6..f3541eaba366a205dfc609d2d6c19ea22be80743 100644 (file)
@@ -1430,10 +1430,10 @@ def err_template_arg_not_convertible : Error<
   "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">;
index 48c1289c855ffc4a17b709b1dee0b627e5e2b321..e216ad110e6798ec14ccf09cadca0eda72a42ca8 100644 (file)
@@ -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;