diff options
author | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
commit | 50b73317314e889cf39c7b1d6cbf419fa7502f22 (patch) | |
tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CXX/special/class.inhctor/elsewhere.cpp | |
parent | dc04cb328508e61aad809d9b53b12f9799a00e7d (diff) | |
download | FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.zip FreeBSD-src-50b73317314e889cf39c7b1d6cbf419fa7502f22.tar.gz |
Vendor import of clang trunk r154661:
http://llvm.org/svn/llvm-project/cfe/trunk@r154661
Diffstat (limited to 'test/CXX/special/class.inhctor/elsewhere.cpp')
-rw-r--r-- | test/CXX/special/class.inhctor/elsewhere.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CXX/special/class.inhctor/elsewhere.cpp b/test/CXX/special/class.inhctor/elsewhere.cpp index 60cfff8..66afa17 100644 --- a/test/CXX/special/class.inhctor/elsewhere.cpp +++ b/test/CXX/special/class.inhctor/elsewhere.cpp @@ -29,3 +29,29 @@ struct I1 : B1 { struct D1 : I1 { using B1::B1; // expected-error {{'B1' is not a direct base of 'D1', can not inherit constructors}} }; + +template<typename T> struct A {}; + +template<typename T> struct B : A<bool>, A<char> { + using A<T>::A; // expected-error {{'A<double>::', which is not a base class of 'B<double>'}} +}; +B<bool> bb; +B<char> bc; +B<double> bd; // expected-note {{here}} + +template<typename T> struct C : A<T> { + using A<bool>::A; // expected-error {{'A<bool>::', which is not a base class of 'C<char>'}} +}; +C<bool> cb; +C<char> cc; // expected-note {{here}} + +template<typename T> struct D : A<T> {}; +template<typename T> struct E : D<T> { + using A<bool>::A; // expected-error {{'A<bool>' is not a direct base of 'E<bool>', can not inherit}} +}; +E<bool> eb; // expected-note {{here}} + +template<typename T> struct F : D<bool> { + using A<T>::A; // expected-error {{'A<bool>' is not a direct base of 'F<bool>'}} +}; +F<bool> fb; // expected-note {{here}} |