From fe2a20ab555ec28af47acaeafdad6d0872f7cb82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 1 Apr 2026 10:56:17 +0200 Subject: [PATCH] Fix warning suppression block in Condition.tests straddling includes --- tests/SelfTest/UsageTests/Condition.tests.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/SelfTest/UsageTests/Condition.tests.cpp b/tests/SelfTest/UsageTests/Condition.tests.cpp index 211dd3b9..922d44d2 100644 --- a/tests/SelfTest/UsageTests/Condition.tests.cpp +++ b/tests/SelfTest/UsageTests/Condition.tests.cpp @@ -6,15 +6,6 @@ // SPDX-License-Identifier: BSL-1.0 -#ifdef __clang__ -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wpadded" -// Wdouble-promotion is not supported until 3.8 -# if (__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ > 7) -# pragma clang diagnostic ignored "-Wdouble-promotion" -# endif -#endif - #include #include @@ -24,6 +15,16 @@ using Catch::Approx; #include #include +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +// Wdouble-promotion is not supported until 3.8 +# if ( __clang_major__ > 3 ) || \ + ( __clang_major__ == 3 && __clang_minor__ > 7 ) +# pragma clang diagnostic ignored "-Wdouble-promotion" +# endif +#endif + namespace { struct TestData {