From 554bcb69c2d785a011a30e7db87a36a87fe7db10 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 15 Aug 2012 20:02:54 +0000 Subject: Vendor import of clang trunk r161861: http://llvm.org/svn/llvm-project/cfe/trunk@161861 --- test/SemaTemplate/class-template-decl.cpp | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'test/SemaTemplate/class-template-decl.cpp') diff --git a/test/SemaTemplate/class-template-decl.cpp b/test/SemaTemplate/class-template-decl.cpp index ec4e016..fe23d92 100644 --- a/test/SemaTemplate/class-template-decl.cpp +++ b/test/SemaTemplate/class-template-decl.cpp @@ -95,3 +95,45 @@ namespace rdar9676205 { }; } +namespace redecl { + int A; // expected-note {{here}} + template struct A; // expected-error {{different kind of symbol}} + + int B; // expected-note {{here}} + template struct B { // expected-error {{different kind of symbol}} + }; + + template struct F; + template struct K; + + int G, H; // expected-note {{here}} + + struct S { + int C; // expected-note {{here}} + template struct C; // expected-error {{different kind of symbol}} + + int D; // expected-note {{here}} + template struct D { // expected-error {{different kind of symbol}} + }; + + int E; + template friend struct E { // expected-error {{cannot define a type in a friend}} + }; + + int F; + template friend struct F; // ok, redecl::F + + template struct G; // ok + + template friend struct H; // expected-error {{different kind of symbol}} + + int I, J, K; + + struct U { + template struct I; // ok + template struct J { // ok + }; + template friend struct K; // ok, redecl::K + }; + }; +} -- cgit v1.1