From b5d1cfe441c2d8a7b164bf7aa848d89611d39be3 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 19 May 2014 17:57:01 +0100 Subject: [PATCH] Suppress switch statement warning --- include/internal/catch_test_spec.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/internal/catch_test_spec.hpp b/include/internal/catch_test_spec.hpp index 762f263e..dde6f207 100644 --- a/include/internal/catch_test_spec.hpp +++ b/include/internal/catch_test_spec.hpp @@ -56,6 +56,15 @@ namespace Catch { case WildcardAtBothEnds: return contains( toLower( testCase.name ), m_name ); } + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" +#endif + throw std::logic_error( "Unknown enum" ); +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } private: std::string m_name;