blob: f1f96f14e859af33e8113095fc173d5615b31182 [file] [log] [blame]
Douglas Gregore37ac4f2008-04-13 21:30:24 +00001// RUN: clang -fsyntax-only -verify %s
2class A { };
3
4class B1 : A { };
5
6class B2 : virtual A { };
7
8class B3 : virtual virtual A { }; // expected-error{{duplicate 'virtual' in base specifier}}
9
10class C : public B1, private B2 { };
11
12
13class D;
14
15class E : public D { }; // expected-error{{base class has incomplete type}}
16
17typedef int I;
18
19class F : public I { }; // expected-error{{base specifier must name a class}}
20
21union U1 : public A { }; // expected-error{{unions cannot have base classes}}
22
23union U2 {};
24
25class G : public U2 { }; // expected-error{{unions cannot be base classes}}