From: Douglas Gregor Date: Wed, 13 Oct 2010 18:27:55 +0000 (+0000) Subject: Place conversion warnings for non-type template arguments under the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=171dcdb092232e5561152c334ce6d2836be33f0c;p=clang 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 --- 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, 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, 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 struct A; // expected-note 5{{template parameter is declared here}} A<0> *a0;