diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
commit | 56d91b49b13fe55c918afbda19f6165b5fbff87a (patch) | |
tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaTemplate/class-template-decl.cpp | |
parent | 41e20f564abdb05101d6b2b29c59459a966c22cc (diff) |
Notes
Diffstat (limited to 'test/SemaTemplate/class-template-decl.cpp')
-rw-r--r-- | test/SemaTemplate/class-template-decl.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/SemaTemplate/class-template-decl.cpp b/test/SemaTemplate/class-template-decl.cpp index ec4e0163855c3..fe23d92411089 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<typename T> struct A; // expected-error {{different kind of symbol}} + + int B; // expected-note {{here}} + template<typename T> struct B { // expected-error {{different kind of symbol}} + }; + + template<typename T> struct F; + template<typename T> struct K; + + int G, H; // expected-note {{here}} + + struct S { + int C; // expected-note {{here}} + template<typename T> struct C; // expected-error {{different kind of symbol}} + + int D; // expected-note {{here}} + template<typename T> struct D { // expected-error {{different kind of symbol}} + }; + + int E; + template<typename T> friend struct E { // expected-error {{cannot define a type in a friend}} + }; + + int F; + template<typename T> friend struct F; // ok, redecl::F + + template<typename T> struct G; // ok + + template<typename T> friend struct H; // expected-error {{different kind of symbol}} + + int I, J, K; + + struct U { + template<typename T> struct I; // ok + template<typename T> struct J { // ok + }; + template<typename T> friend struct K; // ok, redecl::K + }; + }; +} |