blob: 63c40fb5769072376103c216bf1f07e824ec45d0 [file] [log] [blame]
Douglas Gregor41f90302010-04-12 20:54:26 +00001// RUN: %clang_cc1 -verify %s
2
3template <class T> struct Base { // expected-note 4 {{member found by ambiguous name lookup}}
4 static void f();
5};
6
7struct X0 { };
8
9template <class T> struct Derived: Base<int>, Base<char> {
10 typename Derived::Base b; // expected-error{{member 'Base' found in multiple base classes of different types}}
11 typename Derived::Base<double> d; // OK
12
13 void g(X0 *t) {
14 t->Derived::Base<T>::f();
15 t->Base<T>::f();
16 t->Base::f(); // expected-error{{member 'Base' found in multiple base classes of different types}} \
Richard Smith4b213d72015-11-12 22:40:09 +000017 // expected-error{{no member named 'f' in 'X0'}}
Douglas Gregor41f90302010-04-12 20:54:26 +000018 }
19};
20
21namespace PR6717 {
22 template <typename T>
23 class WebVector {
Richard Smith7b8c3c92011-07-14 21:35:26 +000024 } // expected-error {{expected ';' after class}}
Douglas Gregor41f90302010-04-12 20:54:26 +000025
Richard Smith7b8c3c92011-07-14 21:35:26 +000026 WebVector(const WebVector<T>& other) { } // expected-error{{undeclared identifier 'T'}} \
27 expected-error{{requires a type specifier}}
Douglas Gregor41f90302010-04-12 20:54:26 +000028
29 template <typename C>
Richard Smith7b8c3c92011-07-14 21:35:26 +000030 WebVector<T>& operator=(const C& other) { } // expected-error{{undeclared identifier 'T'}}
Douglas Gregor41f90302010-04-12 20:54:26 +000031}