diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-25 22:21:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-25 22:21:04 +0000 |
commit | 684d096c204c5eef29c10777bce890400d235d8c (patch) | |
tree | a7e3f7f7e3f10eecec39df906746c0aa8368e140 /lib/CodeGen/CGVtable.cpp | |
parent | eab5d1eaaa662c849f1f9920dc8c6a31d7c32d47 (diff) |
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;
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99561 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
0 files changed, 0 insertions, 0 deletions