Revert "Reapply "[llvm-jitlink] Use concurrent linking by default." with fixes. ...
[llvm-project.git] / clang / test / CXX / class.derived / class.abstract / p16.cpp
blobe02dc39dbbcd6ae94aa7b2e76e61c560a4c0203e
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
3 struct A {
4 virtual void a(); // expected-note{{overridden virtual function is here}}
5 virtual void b() = delete; // expected-note{{overridden virtual function is here}}
6 };
8 struct B: A {
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}}
13 struct C: A {
14 virtual void a();
15 virtual void b() = delete;
18 struct E;
19 struct F;
20 struct G;
21 struct H;
22 struct D {
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}}
27 friend struct F;
29 private:
30 D &operator=(const D&) = default;
31 D &operator=(D&&) = default;
32 virtual ~D(); // expected-note 2{{here}}
34 struct E : D {};
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}}
39 struct F : D {};
40 struct G : D {};
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}}
49 ~H();