[cfe-commits] r71161 - /cfe/trunk/test/SemaTemplate/dependent-type-identity.cpp
Douglas Gregor
dgregor at apple.com
Thu May 7 08:32:07 PDT 2009
Author: dgregor
Date: Thu May 7 10:31:47 2009
New Revision: 71161
URL: http://llvm.org/viewvc/llvm-project?rev=71161&view=rev
Log:
Test a few more variants of dependent type names
Modified:
cfe/trunk/test/SemaTemplate/dependent-type-identity.cpp
Modified: cfe/trunk/test/SemaTemplate/dependent-type-identity.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/dependent-type-identity.cpp?rev=71161&r1=71160&r2=71161&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/dependent-type-identity.cpp (original)
+++ cfe/trunk/test/SemaTemplate/dependent-type-identity.cpp Thu May 7 10:31:47 2009
@@ -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 @@
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}}
};
More information about the cfe-commits
mailing list