From: Douglas Gregor Date: Thu, 7 May 2009 15:31:47 +0000 (+0000) Subject: Test a few more variants of dependent type names X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bbf646ffcb407a26755a01bef44d294310001e2;p=clang 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 --- 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 + struct X2 { + template + struct apply { + typedef U* type; + }; + }; +} + +namespace Nalias = N; + template struct X0 { }; +using namespace N; + template struct X1 { typedef T type; @@ -34,4 +48,19 @@ struct X1 { 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}} };