mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-21 21:06:11 +01:00
Explicitly silence Wnon-virtual-dtor in Decomposer and MatchExpr
Closes #2854
This commit is contained in:
parent
a654e4b038
commit
fa5a53df17
@ -68,6 +68,7 @@ function(add_warnings_to_targets targets)
|
||||
"-Wmissing-noreturn"
|
||||
"-Wmissing-prototypes"
|
||||
"-Wmissing-variable-declarations"
|
||||
"-Wnon-virtual-dtor"
|
||||
"-Wnull-dereference"
|
||||
"-Wold-style-cast"
|
||||
"-Woverloaded-virtual"
|
||||
|
@ -110,9 +110,11 @@
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wsign-compare"
|
||||
# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#elif defined __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#endif
|
||||
|
||||
#if defined(CATCH_CPP20_OR_GREATER) && __has_include(<compare>)
|
||||
|
@ -18,6 +18,16 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wsign-compare"
|
||||
# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#elif defined __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#endif
|
||||
|
||||
template<typename ArgT, typename MatcherT>
|
||||
class MatchExpr : public ITransientExpression {
|
||||
ArgT && m_arg;
|
||||
@ -36,6 +46,13 @@ namespace Catch {
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
#elif defined __GNUC__
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
namespace Matchers {
|
||||
template <typename ArgT>
|
||||
class MatcherBase;
|
||||
|
Loading…
Reference in New Issue
Block a user