Skip to content

Commit 8492fd4

Browse files
committed
Ignore Wunreachable-code-return in Generators.tests.cpp
1 parent fe2a20a commit 8492fd4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/SelfTest/UsageTests/Generators.tests.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ TEST_CASE("#1913 - GENERATEs can share a line", "[regression][generators]") {
281281
REQUIRE(i != j);
282282
}
283283

284+
#if defined( __clang__ )
285+
# pragma clang diagnostic push
286+
# pragma clang diagnostic ignored "-Wunreachable-code-return"
287+
#endif
288+
284289
namespace {
285290
class test_generator : public Catch::Generators::IGenerator<int> {
286291
public:
@@ -306,6 +311,10 @@ namespace {
306311

307312
} // namespace
308313

314+
#if defined( __clang__ )
315+
# pragma clang diagnostic pop
316+
#endif
317+
309318
TEST_CASE( "#2615 - Throwing in constructor generator fails test case but does not abort",
310319
"[!shouldfail][regression][generators]" ) {
311320
// this should fail the test case, but not abort the application

0 commit comments

Comments
 (0)