From fdad46b10dba312265d31f53806af2bf139fcdf4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 2 Nov 2017 01:36:48 +0100 Subject: [PATCH] Suppress some harmless clang warnings in a Catch header Just avoid harmless but annoying warnings in catch_impl.hpp when using clang. --- tests/test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test.cpp b/tests/test.cpp index cee62b6e5f..9a324ea802 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -18,12 +18,19 @@ #pragma hdrstop #endif +// Suppress some warnings in catch_impl.hpp. +wxCLANG_WARNING_SUPPRESS(missing-braces) +wxCLANG_WARNING_SUPPRESS(logical-op-parentheses) + // This file needs to get the CATCH definitions in addition to the usual // assertion macros declarations from catch.hpp included by testprec.h. // Including an internal file like this is ugly, but there doesn't seem to be // any better way, see https://github.com/philsquared/Catch/issues/1061 #include "internal/catch_impl.hpp" +wxCLANG_WARNING_RESTORE(missing-braces) +wxCLANG_WARNING_RESTORE(logical-op-parentheses) + // This probably could be done by predefining CLARA_CONFIG_MAIN, but at the // point where we are, just define this global variable manually. namespace Catch { namespace Clara { UnpositionalTag _; } }