diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-10-13 17:22:14 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-10-13 17:22:14 +0000 |
commit | b535041ee33c5eff255832bc5541c8d52aae8254 (patch) | |
tree | 5e2d6d3f5d283e693da17f28cfd9014da894c8d6 /test/SemaTemplate/temp_arg_nontype.cpp | |
parent | 35495eb14f22c4e96956912e23ca2a433227ad8c (diff) | |
download | clang-b535041ee33c5eff255832bc5541c8d52aae8254.tar.gz clang-b535041ee33c5eff255832bc5541c8d52aae8254.tar.bz2 clang-b535041ee33c5eff255832bc5541c8d52aae8254.tar.xz |
Fix a silly bug in the suppression of non-error diagnostics in a
SFINAE context, where we weren't getting the right diagnostic argument
count. I blame DiagnosticBuilder's weirdness. Fixes PR8372.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/temp_arg_nontype.cpp')
-rw-r--r-- | test/SemaTemplate/temp_arg_nontype.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp index fffd1dd168..48c1289c85 100644 --- a/test/SemaTemplate/temp_arg_nontype.cpp +++ b/test/SemaTemplate/temp_arg_nontype.cpp @@ -243,3 +243,8 @@ namespace test8 { B<&c03> b03; } } + +namespace PR8372 { + template <int I> void foo() { } // expected-note{{template parameter is declared here}} + void bar() { foo <0x80000000> (); } // expected-warning{{non-type template argument value '2147483648' truncated to '-2147483648' for template parameter of type 'int'}} +} |