mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +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-noreturn"
|
||||||
"-Wmissing-prototypes"
|
"-Wmissing-prototypes"
|
||||||
"-Wmissing-variable-declarations"
|
"-Wmissing-variable-declarations"
|
||||||
|
"-Wnon-virtual-dtor"
|
||||||
"-Wnull-dereference"
|
"-Wnull-dereference"
|
||||||
"-Wold-style-cast"
|
"-Wold-style-cast"
|
||||||
"-Woverloaded-virtual"
|
"-Woverloaded-virtual"
|
||||||
|
@ -110,9 +110,11 @@
|
|||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
# pragma clang diagnostic push
|
# pragma clang diagnostic push
|
||||||
# pragma clang diagnostic ignored "-Wsign-compare"
|
# pragma clang diagnostic ignored "-Wsign-compare"
|
||||||
|
# pragma clang diagnostic ignored "-Wnon-virtual-dtor"
|
||||||
#elif defined __GNUC__
|
#elif defined __GNUC__
|
||||||
# pragma GCC diagnostic push
|
# pragma GCC diagnostic push
|
||||||
# pragma GCC diagnostic ignored "-Wsign-compare"
|
# pragma GCC diagnostic ignored "-Wsign-compare"
|
||||||
|
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CATCH_CPP20_OR_GREATER) && __has_include(<compare>)
|
#if defined(CATCH_CPP20_OR_GREATER) && __has_include(<compare>)
|
||||||
|
@ -18,6 +18,16 @@
|
|||||||
|
|
||||||
namespace Catch {
|
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>
|
template<typename ArgT, typename MatcherT>
|
||||||
class MatchExpr : public ITransientExpression {
|
class MatchExpr : public ITransientExpression {
|
||||||
ArgT && m_arg;
|
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 {
|
namespace Matchers {
|
||||||
template <typename ArgT>
|
template <typename ArgT>
|
||||||
class MatcherBase;
|
class MatcherBase;
|
||||||
|
Loading…
Reference in New Issue
Block a user