Add -Wsuggest-destructor-override to enabled warnings

This commit is contained in:
Martin Hořeňovský 2022-05-02 10:45:02 +02:00
parent 722c197855
commit 7752229105
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
6 changed files with 6 additions and 5 deletions

View File

@ -73,6 +73,7 @@ function(add_warnings_to_targets targets)
"-Wreturn-std-move"
"-Wshadow"
"-Wstrict-aliasing"
"-Wsuggest-destructor-override"
"-Wsuggest-override"
"-Wundef"
"-Wuninitialized"

View File

@ -308,7 +308,7 @@ struct MyListener : Catch::EventListenerBase {
using EventListenerBase::EventListenerBase; // inherit constructor
// Get rid of Wweak-tables
~MyListener();
~MyListener() override;
// The whole test run starting
void testRunStarting( Catch::TestRunInfo const& testRunInfo ) override {

View File

@ -23,7 +23,7 @@ namespace Catch {
class IMutableContext : public IContext {
public:
virtual ~IMutableContext(); // = default
~IMutableContext() override; // = default
virtual void setResultCapture( IResultCapture* resultCapture ) = 0;
virtual void setConfig( IConfig const* config ) = 0;

View File

@ -33,7 +33,7 @@ namespace Detail {
setp( data, data + sizeof(data) );
}
~StreamBufImpl() noexcept {
~StreamBufImpl() noexcept override {
StreamBufImpl::sync();
}

View File

@ -32,7 +32,7 @@ namespace Catch {
GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent )
: TrackerBase( nameAndLocation, ctx, parent )
{}
~GeneratorTracker();
~GeneratorTracker() override;
static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) {
GeneratorTracker* tracker;

View File

@ -22,7 +22,7 @@ namespace Matchers {
class MatcherGenericBase : public MatcherUntypedBase {
public:
MatcherGenericBase() = default;
virtual ~MatcherGenericBase(); // = default;
~MatcherGenericBase() override; // = default;
MatcherGenericBase(MatcherGenericBase&) = default;
MatcherGenericBase(MatcherGenericBase&&) = default;