aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-05-07 15:31:47 +0000
committerDouglas Gregor <dgregor@apple.com>2009-05-07 15:31:47 +0000
commit6bbf646ffcb407a26755a01bef44d294310001e2 (patch)
tree5228ac16338b195391897f043e3e6b3a57a28e3d
parent45fbaf02fb94a9bc6a108c9621d3db0092d11e94 (diff)
Test a few more variants of dependent type names
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71161 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaTemplate/dependent-type-identity.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/SemaTemplate/dependent-type-identity.cpp b/test/SemaTemplate/dependent-type-identity.cpp
index 98fc2a8c6e..61fa81a654 100644
--- a/test/SemaTemplate/dependent-type-identity.cpp
+++ b/test/SemaTemplate/dependent-type-identity.cpp
@@ -1,8 +1,22 @@
// RUN: clang-cc -fsyntax-only -verify %s
+namespace N {
+ template<typename T>
+ struct X2 {
+ template<typename U>
+ struct apply {
+ typedef U* type;
+ };
+ };
+}
+
+namespace Nalias = N;
+
template<typename T>
struct X0 { };
+using namespace N;
+
template<typename T, typename U>
struct X1 {
typedef T type;
@@ -34,4 +48,19 @@ struct X1 {
void f5(typename U::template apply<T>::type*);
void f5(typename type::template apply<T>::type*);
void f5(typename type::template apply<U_type>::type*); // expected-error{{redeclar}}
+
+ void f6(typename N::X2<T>::template apply<U> *); // expected-note{{previous}}
+ void f6(typename N::X2<U>::template apply<U> *);
+ void f6(typename N::X2<U>::template apply<T> *);
+ void f6(typename ::N::X2<type>::template apply<U_type> *); // expected-error{{redeclar}}
+
+ void f7(typename N::X2<T>::template apply<U> *); // expected-note{{previous}}
+ void f7(typename N::X2<U>::template apply<U> *);
+ void f7(typename N::X2<U>::template apply<T> *);
+ void f7(typename X2<type>::template apply<U_type> *); // expected-error{{redeclar}}
+
+ void f8(typename N::X2<T>::template apply<U> *); // expected-note{{previous}}
+ void f8(typename N::X2<U>::template apply<U> *);
+ void f8(typename N::X2<U>::template apply<T> *);
+ void f8(typename ::Nalias::X2<type>::template apply<U_type> *); // expected-error{{redeclar}}
};