Skip to content

Commit

Permalink
WIP: ignore Wnon-virtual-dtor
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Apr 30, 2024
1 parent a654e4b commit fa03534
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMake/CatchMiscFunctions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/catch2/internal/catch_decomposer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
#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>)
Expand Down
10 changes: 10 additions & 0 deletions src/catch2/matchers/internal/catch_matchers_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

namespace Catch {

#if defined __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif

template<typename ArgT, typename MatcherT>
class MatchExpr : public ITransientExpression {
ArgT && m_arg;
Expand All @@ -36,6 +41,11 @@ namespace Catch {
}
};

#if defined __GNUC__
# pragma GCC diagnostic pop
#endif


namespace Matchers {
template <typename ArgT>
class MatcherBase;
Expand Down

0 comments on commit fa03534

Please sign in to comment.