summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/temp.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-02-15 03:06:15 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-02-15 03:06:15 +0000
commit0650f897a470730159d70e1617c9697c65b514d4 (patch)
tree9e225372c4c8af11e342f96517dee0e55cd8f962 /clang/test/SemaTemplate/temp.cpp
parent3fb7d4f55fa028ce57dbdf533835b583fc10ecf8 (diff)
downloadbcm5719-llvm-0650f897a470730159d70e1617c9697c65b514d4.tar.gz
bcm5719-llvm-0650f897a470730159d70e1617c9697c65b514d4.zip
Revert "Fix implementation of [temp.local]p4."
This reverts commit 40bd10b770813bd1471d46f514545437516aa4ba. This seems to now emit an error when building the sanitizer tests: http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53965/consoleFull. llvm-svn: 354097
Diffstat (limited to 'clang/test/SemaTemplate/temp.cpp')
-rw-r--r--clang/test/SemaTemplate/temp.cpp39
1 files changed, 4 insertions, 35 deletions
diff --git a/clang/test/SemaTemplate/temp.cpp b/clang/test/SemaTemplate/temp.cpp
index a8a2daeac31..e037f0f0713 100644
--- a/clang/test/SemaTemplate/temp.cpp
+++ b/clang/test/SemaTemplate/temp.cpp
@@ -8,43 +8,12 @@ namespace test0 {
// PR7252
namespace test1 {
- namespace A { template<typename T> struct Base { typedef T t; }; } // expected-note 3{{member}}
+ namespace A { template<typename T> struct Base { typedef T t; }; } // expected-note {{member found}}
namespace B { template<typename T> struct Base { typedef T t; }; } // expected-note {{member found}}
template<typename T> struct Derived : A::Base<char>, B::Base<int> {
- typename Derived::Base<float>::t x; // expected-error {{found in multiple base classes of different types}}
+ // FIXME: the syntax error here is unfortunate
+ typename Derived::Base<float>::t x; // expected-error {{found in multiple base classes of different types}} \
+ // expected-error {{expected member name or ';'}}
};
-
- class X : A::Base<int> {}; // expected-note 2{{private}}
- class Y : A::Base<float> {};
- struct Z : A::Base<double> {};
- struct Use1 : X, Y {
- Base<double> b1; // expected-error {{private}}
- Use1::Base<double> b2; // expected-error {{private}}
- };
- struct Use2 : Z, Y {
- Base<double> b1;
- Use2::Base<double> b2;
- };
- struct Use3 : X, Z {
- Base<double> b1;
- Use3::Base<double> b2;
- };
-}
-
-namespace test2 {
- struct A { static int x; }; // expected-note 4{{member}}
- struct B { template<typename T> static T x(); }; // expected-note 4{{member}}
- struct C { template<typename T> struct x {}; }; // expected-note 3{{member}}
- struct D { template<typename T> static T x(); }; // expected-note {{member}}
-
- template<typename ...T> struct X : T... {};
-
- void f() {
- X<A, B>::x<int>(); // expected-error {{found in multiple base classes of different types}}
- X<A, C>::x<int>(); // expected-error {{found in multiple base classes of different types}}
- X<B, C>::x<int>(); // expected-error {{found in multiple base classes of different types}}
- X<A, B, C>::x<int>(); // expected-error {{found in multiple base classes of different types}}
- X<A, B, D>::x<int>(); // expected-error {{found in multiple base classes of different types}}
- }
}
OpenPOWER on IntegriCloud