// RUN: clang-cc -fsyntax-only -verify %s // This test concerns the identity of dependent types within the // canonical type system. This corresponds to C++ [temp.type], which // specifies type equivalence within a template. // // FIXME: template template parameters namespace N { template struct X2 { template struct apply { typedef U* type; }; }; } namespace Nalias = N; template struct X0 { }; using namespace N; template struct X1 { typedef T type; typedef U U_type; void f0(T); // expected-note{{previous}} void f0(U); void f0(type); // expected-error{{redeclar}} void f1(T*); // expected-note{{previous}} void f1(U*); void f1(type*); // expected-error{{redeclar}} void f2(X0*); // expected-note{{previous}} void f2(X0*); void f2(X0*); // expected-error{{redeclar}} void f3(X0*); // expected-note{{previous}} void f3(X0*); void f3(::X0*); // expected-error{{redeclar}} void f4(typename T::template apply*); // expected-note{{previous}} void f4(typename U::template apply*); void f4(typename type::template apply*); void f4(typename type::template apply*); // expected-error{{redeclar}} void f5(typename T::template apply::type*); // expected-note{{previous}} void f5(typename U::template apply::type*); void f5(typename U::template apply::type*); void f5(typename type::template apply::type*); void f5(typename type::template apply::type*); // expected-error{{redeclar}} void f6(typename N::X2::template apply *); // expected-note{{previous}} void f6(typename N::X2::template apply *); void f6(typename N::X2::template apply *); void f6(typename ::N::X2::template apply *); // expected-error{{redeclar}} void f7(typename N::X2::template apply *); // expected-note{{previous}} void f7(typename N::X2::template apply *); void f7(typename N::X2::template apply *); void f7(typename X2::template apply *); // expected-error{{redeclar}} void f8(typename N::X2::template apply *); // expected-note{{previous}} void f8(typename N::X2::template apply *); void f8(typename N::X2::template apply *); void f8(typename ::Nalias::X2::template apply *); // expected-error{{redeclar}} };