Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Add pragma ignore for -Wnon-virtual-dtor in Catch matchers

Commit
38248f3f2c13867917ee50738e290160cfd5cebc
Author
Igor Murashkin ·
Committer
Martin Hořeňovský
Parents
c9de7dd12d29

Files · Download .tar.gz

Changes

 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<typename ObjectT>
         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<typename T>
         struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {