From 38248f3f2c13867917ee50738e290160cfd5cebc Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Mon, 6 Aug 2018 16:20:59 -0700 Subject: [PATCH] Add pragma ignore for -Wnon-virtual-dtor in Catch matchers --- include/internal/catch_matchers.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/internal/catch_matchers.h b/include/internal/catch_matchers.h index f2e3aee9..29692fc0 100644 --- a/include/internal/catch_matchers.h +++ b/include/internal/catch_matchers.h @@ -34,6 +34,11 @@ namespace Matchers { mutable std::string m_cachedToString; }; +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wnon-virtual-dtor" +#endif + template struct MatcherMethod { virtual bool match( ObjectT const& arg ) const = 0; @@ -43,6 +48,10 @@ namespace Matchers { virtual bool match( PtrT* arg ) const = 0; }; +#ifdef __clang__ +# pragma clang diagnostic pop +#endif + template struct MatcherBase : MatcherUntypedBase, MatcherMethod {