From 8492fd444e42f331f48611d2b5ef11c8ce338423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Wed, 1 Apr 2026 11:02:56 +0200 Subject: [PATCH] Ignore Wunreachable-code-return in Generators.tests.cpp --- tests/SelfTest/UsageTests/Generators.tests.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/SelfTest/UsageTests/Generators.tests.cpp b/tests/SelfTest/UsageTests/Generators.tests.cpp index 3394b4b5..6eaf33a8 100644 --- a/tests/SelfTest/UsageTests/Generators.tests.cpp +++ b/tests/SelfTest/UsageTests/Generators.tests.cpp @@ -281,6 +281,11 @@ TEST_CASE("#1913 - GENERATEs can share a line", "[regression][generators]") { REQUIRE(i != j); } +#if defined( __clang__ ) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wunreachable-code-return" +#endif + namespace { class test_generator : public Catch::Generators::IGenerator { public: @@ -306,6 +311,10 @@ namespace { } // namespace +#if defined( __clang__ ) +# pragma clang diagnostic pop +#endif + TEST_CASE( "#2615 - Throwing in constructor generator fails test case but does not abort", "[!shouldfail][regression][generators]" ) { // this should fail the test case, but not abort the application