diff options
author | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 056abd2059c65a3e908193aeae16fad98017437c (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/SemaTemplate/dependent-names.cpp | |
parent | cc73504950eb7b5dff2dded9bedd67bc36d64641 (diff) | |
download | FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/SemaTemplate/dependent-names.cpp')
-rw-r--r-- | test/SemaTemplate/dependent-names.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/test/SemaTemplate/dependent-names.cpp b/test/SemaTemplate/dependent-names.cpp index 924bad9..efa4d28 100644 --- a/test/SemaTemplate/dependent-names.cpp +++ b/test/SemaTemplate/dependent-names.cpp @@ -319,8 +319,30 @@ namespace PR11421 { template < unsigned > struct X { static const unsigned dimension = 3; template<unsigned dim=dimension> - struct Y: Y<dim> { }; // expected-error {{incomplete type}} expected-note {{is not complete until the closing}} + struct Y: Y<dim> { }; // expected-error{{circular inheritance between 'Y<dim>' and 'Y<dim>'}} }; typedef X<3> X3; -X3::Y<>::iterator it; // expected-note {{requested here}} +X3::Y<>::iterator it; // expected-error {{no type named 'iterator' in 'PR11421::X<3>::Y<3>'}} +} + +namespace rdar12629723 { + template<class T> + struct X { + struct C : public C { }; // expected-error{{circular inheritance between 'rdar12629723::X::C' and 'rdar12629723::X::C'}} + + struct B; + + struct A : public B { // expected-note{{'rdar12629723::X::A' declared here}} + virtual void foo() { } + }; + struct B; + + struct D : T::foo { }; + struct E : D { }; + }; + + template<class T> + struct X<T>::B : public A { // expected-error{{circular inheritance between 'rdar12629723::X::A' and 'rdar12629723::X::B'}} + virtual void foo() { } + }; } |