summaryrefslogtreecommitdiffstats
path: root/test/clang-tidy/modernize-use-override-no-destructors.cpp
blob: eaadb07b947b383f7b8c207cf122315cdd613883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %check_clang_tidy %s modernize-use-override %t -- \
// RUN:   -config="{CheckOptions: [{key: modernize-use-override.IgnoreDestructors, value: 1}]}" \
// RUN: -- -std=c++11

struct Base {
  virtual ~Base();
  virtual void f();
};

struct Simple : public Base {
  virtual ~Simple();
  // CHECK-MESSAGES-NOT: warning:
  virtual void f();
  // CHECK-MESSAGES: :[[@LINE-1]]:16: warning: prefer using
  // CHECK-FIXES: {{^}}  void f() override;
};