[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CXX / class.derived / class.virtual / p2.cpp
blob9e8d243fc3b0ffccf8a14c8adad171d5f1391e2b
1 // RUN: %clang_cc1 -fsyntax-only -verify -Wno-inaccessible-base %s
2 struct A {
3 virtual void f() = 0; // expected-note 2{{overridden virtual function}}
4 };
6 struct Aprime : virtual A {
7 virtual void f();
8 };
10 struct B : Aprime {
11 virtual void f(); // expected-note 3{{final overrider of 'A::f'}}
14 struct C : virtual A {
15 virtual void f(); // expected-note{{final overrider of 'A::f'}}
18 struct D : B, C { }; // expected-error{{virtual function 'A::f' has more than one final overrider in 'D'}}
20 struct B2 : B { };
22 struct E : B, B2 { }; //expected-error{{virtual function 'A::f' has more than one final overrider in 'E'}}
24 struct F : B, B2 {
25 virtual void f(); // okay
28 struct G : F { }; // okay
30 struct H : G, A { }; // okay
32 namespace MultipleSubobjects {
33 struct A { virtual void f(); };
34 struct B : A { virtual void f(); };
35 struct C : A { virtual void f(); };
36 struct D : B, C { }; // okay