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" "-Wreturn-std-move"
"-Wshadow" "-Wshadow"
"-Wstrict-aliasing" "-Wstrict-aliasing"
"-Wsuggest-destructor-override"
"-Wsuggest-override" "-Wsuggest-override"
"-Wundef" "-Wundef"
"-Wuninitialized" "-Wuninitialized"

View File

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

View File

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

View File

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

View File

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

View File

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