Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.res / temp.local / p3.cpp
blob87589e1e5bcdc86a3d9adfdab120e3262faf860a
1 // RUN: %clang_cc1 -verify=expected,precxx17 %std_cxx98-14 %s
2 // RUN: %clang_cc1 -verify=expected,cxx17 %std_cxx17- %s
4 template <class T> struct Base {
5 // expected-note@-1 2{{member type 'Base<int>' found by ambiguous name lookup}}
6 // expected-note@-2 2{{member type 'Base<char>' found by ambiguous name lookup}}
7 static void f();
8 };
10 struct X0 { };
12 template <class T> struct Derived: Base<int>, Base<char> {
13 typename Derived::Base b; // expected-error{{member 'Base' found in multiple base classes of different types}}
14 typename Derived::Base<double> d; // OK
16 void g(X0 *t) {
17 t->Derived::Base<T>::f();
18 t->Base<T>::f();
19 t->Base::f(); // expected-error{{member 'Base' found in multiple base classes of different types}} \
20 // expected-error{{no member named 'f' in 'X0'}}
24 namespace PR6717 {
25 template <typename T>
26 class WebVector {
27 } // expected-error {{expected ';' after class}}
29 WebVector(const WebVector<T>& other) { } // expected-error{{undeclared identifier 'T'}} \
30 precxx17-error{{a type specifier is required}} \
31 cxx17-error{{deduction guide declaration without trailing return type}}
33 template <typename C>
34 WebVector<T>& operator=(const C& other) { } // expected-error{{undeclared identifier 'T'}}