1// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s -verify -Wsuggest-override
2
3struct A {
4  ~A();
5  void run();
6};
7
8struct B : public A {
9  ~B();
10  void run();
11};
12
13struct C {
14  virtual void run(); // expected-note 2{{overridden virtual function is here}}
15  virtual ~C();
16};
17
18struct D : public C {
19  void run();
20  // expected-warning@-1 {{'run()' overrides a member function but is not marked 'override'}}
21  ~D();
22};
23
24struct E : public C {
25  virtual void run();
26  // expected-warning@-1 {{'run()' overrides a member function but is not marked 'override'}}
27  virtual ~E();
28};
29
30struct F : public C {
31  void run() override;
32  ~F() override;
33};
34
35struct G : public C {
36  void run() final;
37  ~G() final;
38};
39