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

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;
};
OpenPOWER on IntegriCloud