summaryrefslogtreecommitdiff
path: root/test/SemaTemplate/temp_arg_nontype.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-29 04:55:13 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-29 04:55:13 +0000
commit77e2c67411084c47b1cf511a191b31adf38662ba (patch)
tree46b698f9be172a1145eb3908e31428f6af99d655 /test/SemaTemplate/temp_arg_nontype.cpp
parent3ff9d1110fed519ad81302ecc154814c33a4962b (diff)
downloadclang-77e2c67411084c47b1cf511a191b31adf38662ba.tar.gz
clang-77e2c67411084c47b1cf511a191b31adf38662ba.tar.bz2
clang-77e2c67411084c47b1cf511a191b31adf38662ba.tar.xz
It turns out that we *can* end up having to display template argument
bindings when the template argument is still an expression; it happens while checking the template arguments of a class template partial specializations. Fixes PR6964. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102595 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaTemplate/temp_arg_nontype.cpp')
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp
index 7b83ff9194..d351eb4588 100644
--- a/test/SemaTemplate/temp_arg_nontype.cpp
+++ b/test/SemaTemplate/temp_arg_nontype.cpp
@@ -193,3 +193,13 @@ namespace EntityReferenced {
typedef X<int*, Y<int*>::f> x; // expected-note{{in instantiation of}}
}
}
+
+namespace PR6964 {
+ template <typename ,int, int = 9223372036854775807L > // expected-warning 2{{non-type template argument value '9223372036854775807' truncated to '-1' for template parameter of type 'int'}} \
+ // expected-note 2{{template parameter is declared here}}
+ struct as_nview { };
+
+ template <typename Sequence, int I0>
+ struct as_nview<Sequence, I0> // expected-note{{while checking a default template argument used here}}
+ { };
+}