bolt/deps/llvm-18.1.8/clang-tools-extra/test/clang-tidy/checkers/modernize/use-override-no-destructors.cpp

16 lines
415 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %check_clang_tidy %s modernize-use-override %t -- \
// RUN: -config="{CheckOptions: {modernize-use-override.IgnoreDestructors: true}}"
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;
};