Skip to content
Commit 63eed633 authored by Douglas Gregor's avatar Douglas Gregor
Browse files

Warn when the conversion of an integral non-type template argument to

the type of its corresponding non-type template parameter changes the
value. Previously, we were diagnosing this as an error, which was
wrong. We give reasonably nice warnings like:

test/SemaTemplate/temp_arg_nontype.cpp:100:10: warning: non-type template
      argument value '256' truncated to '0' for template parameter of type
      'unsigned char'
Overflow<256> *overflow3; // expected-warning{{non-type template ...
         ^~~
test/SemaTemplate/temp_arg_nontype.cpp:96:24: note: template parameter is
      declared here
template<unsigned char C> struct Overflow;
                       ^

llvm-svn: 99561
parent 210b5905
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment