1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
4 virtual void a(); // expected-note{{overridden virtual function is here}}
5 virtual void b() = delete; // expected-note{{overridden virtual function is here}}
9 virtual void a() = delete; // expected-error{{deleted function 'a' cannot override a non-deleted function}}
10 virtual void b(); // expected-error{{non-deleted function 'b' cannot override a deleted function}}
15 virtual void b() = delete;
23 virtual E
&operator=(const E
&); // expected-note {{here}}
24 virtual F
&operator=(const F
&);
25 virtual G
&operator=(G
&&); // expected-note {{here}}
26 virtual H
&operator=(H
&&); // expected-note {{here}}
30 D
&operator=(const D
&) = default;
31 D
&operator=(D
&&) = default;
32 virtual ~D(); // expected-note 2{{here}}
35 // expected-error@-1 {{deleted function '~E' cannot override a non-deleted function}}
36 // expected-note@-2 {{destructor of 'E' is implicitly deleted because base class 'D' has an inaccessible destructor}}
37 // expected-error@-3 {{deleted function 'operator=' cannot override a non-deleted function}}
38 // expected-note@-4 {{copy assignment operator of 'E' is implicitly deleted because base class 'D' has an inaccessible copy assignment operator}}
41 // expected-error@-1 {{deleted function '~G' cannot override a non-deleted function}}
42 // expected-note@-2 {{destructor of 'G' is implicitly deleted because base class 'D' has an inaccessible destructor}}
43 // expected-error@-3 {{deleted function 'operator=' cannot override a non-deleted function}}
44 // expected-note@-4 {{move assignment operator of 'G' is implicitly deleted because base class 'D' has an inaccessible move assignment operator}}
45 struct H
: D
{ // expected-note {{deleted because base class 'D' has an inaccessible move assignment}}
46 H
&operator=(H
&&) = default; // expected-warning {{implicitly deleted}} expected-note{{replace 'default'}}
47 // expected-error@-1 {{deleted function 'operator=' cannot override a non-deleted function}}
48 // expected-note@-3 {{move assignment operator of 'H' is implicitly deleted because base class 'D' has an inaccessible move assignment operator}}