]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CXX/temp/temp.res/temp.local/p3.cpp
Vendor import of clang trunk r238337:
[FreeBSD/FreeBSD.git] / test / CXX / temp / temp.res / temp.local / p3.cpp
1 // RUN: %clang_cc1 -verify %s
2
3 template <class T> struct Base { // expected-note 4 {{member found by ambiguous name lookup}}
4   static void f();
5 }; 
6
7 struct X0 { };
8
9 template <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}} \
17     // expected-error{{no member named 'f' in 'X0'}} \
18     // expected-error{{'Base' is not a class, namespace, or enumeration}}
19   }
20 };
21
22 namespace PR6717 {
23   template <typename T>
24   class WebVector {
25   } // expected-error {{expected ';' after class}}
26
27     WebVector(const WebVector<T>& other) { } // expected-error{{undeclared identifier 'T'}} \
28                                                 expected-error{{requires a type specifier}}
29
30   template <typename C>
31   WebVector<T>& operator=(const C& other) { } // expected-error{{undeclared identifier 'T'}}
32 }