[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / SemaCXX / virtual-base-used.cpp
blobd147b13f04fdf63d5ffa59afafe325f7d8b64245
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // PR7800
4 class NoDestroy { ~NoDestroy(); }; // expected-note 3 {{declared private here}}
5 struct A {
6 virtual ~A();
7 };
9 struct B : public virtual A {
10 NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
12 struct D : public virtual B {
13 virtual void foo();
14 ~D();
16 void D::foo() { // expected-note {{implicit default destructor for 'B' first required here}}
19 struct E : public virtual A {
20 NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
22 struct F : public E { // expected-note {{implicit default destructor for 'E' first required here}}
24 struct G : public virtual F {
25 virtual void foo();
26 ~G();
28 void G::foo() { // expected-note {{implicit default destructor for 'F' first required here}}
31 struct H : public virtual A {
32 NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
34 struct I : public virtual H {
35 ~I();
37 struct J : public I {
38 virtual void foo();
39 ~J();
41 void J::foo() { // expected-note {{implicit default destructor for 'H' first required here}}