aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-10-13 18:27:55 +0000
committerDouglas Gregor <dgregor@apple.com>2010-10-13 18:27:55 +0000
commit171dcdb092232e5561152c334ce6d2836be33f0c (patch)
tree0bfed627b56e3d658e44ae4b7ac8e99623b672f6
parentdb4d4bb03df52920cf379797a7ff5c9900f938a6 (diff)
Place conversion warnings for non-type template arguments under the
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
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index b6c1515334..f3541eaba3 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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">;
diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp
index 48c1289c85..e216ad110e 100644
--- a/test/SemaTemplate/temp_arg_nontype.cpp
+++ b/test/SemaTemplate/temp_arg_nontype.cpp
@@ -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;