1 // RUN: %clang_cc1 -verify -std=c++11 %s -fcxx-exceptions
4 // A private, but nonetheless trivial, destructor.
5 ~BadDtor() = default; // expected-note 9{{here}}
9 BadDtor
*p
= new BadDtor
[3]; // expected-error {{private destructor}}
10 delete [] p
; // expected-error {{private destructor}}
11 const BadDtor
&dd2
= BadDtor(); // expected-error {{private destructor}}
12 BadDtor dd
; // expected-error {{private destructor}}
13 throw dd
; // expected-error {{private destructor}}
17 BadDtor bd
; // expected-note {{inaccessible destructor}}
19 V v
; // expected-error {{deleted function}}
20 struct W
: BadDtor
{ // expected-note {{inaccessible destructor}}
23 W w
; // expected-error {{deleted function}}
24 struct X
: BadDtor
{ // expected-error {{private destructor}}
28 BadDtor dd
; // expected-error {{private destructor}}
31 struct Z
: virtual BadDtor
{ // expected-error {{private destructor}}
34 BadDtor dd
; // expected-error {{private destructor}}
38 BadDtor
*p
= new BadDtor
[3];
40 const BadDtor
&dd2
= BadDtor();
51 struct Z
: virtual BadDtor
{