mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Add Wsuggest-override to warning flags
This commit is contained in:
parent
ae0ba81423
commit
29d4b3768c
@ -61,6 +61,7 @@ function(add_warnings_to_targets targets)
|
|||||||
"-Wunused-function"
|
"-Wunused-function"
|
||||||
"-Wcall-to-pure-virtual-from-ctor-dtor"
|
"-Wcall-to-pure-virtual-from-ctor-dtor"
|
||||||
"-Wdeprecated-register"
|
"-Wdeprecated-register"
|
||||||
|
"-Wsuggest-override"
|
||||||
)
|
)
|
||||||
foreach(warning ${CHECKED_WARNING_FLAGS})
|
foreach(warning ${CHECKED_WARNING_FLAGS})
|
||||||
add_cxx_flag_if_supported_to_targets(${warning} "${targets}")
|
add_cxx_flag_if_supported_to_targets(${warning} "${targets}")
|
||||||
|
@ -16,20 +16,22 @@
|
|||||||
#endif
|
#endif
|
||||||
#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1
|
#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1
|
||||||
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic push
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic ignored "-Wweak-vtables"
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wexit-time-destructors"
|
#pragma clang diagnostic ignored "-Wweak-vtables"
|
||||||
#pragma clang diagnostic ignored "-Wshadow"
|
#pragma clang diagnostic ignored "-Wexit-time-destructors"
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
#pragma clang diagnostic ignored "-Wshadow"
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <catch2/internal/catch_clara_upstream.hpp>
|
#include <catch2/internal/catch_clara_upstream.hpp>
|
||||||
|
|
||||||
#ifdef __clang__
|
#if defined(__clang__)
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Restore Clara's value for console width, if present
|
// Restore Clara's value for console width, if present
|
||||||
#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
|
#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
|
||||||
#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
|
#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH
|
||||||
|
@ -705,7 +705,7 @@ namespace detail {
|
|||||||
};
|
};
|
||||||
struct BoundFlagRefBase : BoundRef {
|
struct BoundFlagRefBase : BoundRef {
|
||||||
virtual auto setFlag( bool flag ) -> ParserResult = 0;
|
virtual auto setFlag( bool flag ) -> ParserResult = 0;
|
||||||
virtual auto isFlag() const -> bool { return true; }
|
bool isFlag() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -105,7 +105,7 @@ namespace Catch {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// !TBD We need to do this another way!
|
// !TBD We need to do this another way!
|
||||||
bool aborting() const final;
|
bool aborting() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user