From eed97e99a4f1117159a001ce50a929b9c84a0930 Mon Sep 17 00:00:00 2001 From: HoseynHeydari Date: Sat, 16 Apr 2022 02:47:54 +0430 Subject: [PATCH] Remove unnecessary includes. (see #2094) --- src/catch2/benchmark/catch_benchmark.hpp | 1 - src/catch2/benchmark/detail/catch_stats.cpp | 1 - src/catch2/catch_tag_alias_autoregistrar.hpp | 1 - src/catch2/catch_translate_exception.hpp | 1 - src/catch2/internal/catch_clara.hpp | 3 ++- src/catch2/internal/catch_combined_tu.cpp | 4 ---- src/catch2/internal/catch_commandline.cpp | 1 - .../internal/catch_compiler_capabilities.hpp | 16 ---------------- src/catch2/internal/catch_console_colour.cpp | 5 +++-- src/catch2/internal/catch_enforce.hpp | 1 - .../catch_exception_translator_registry.cpp | 1 - .../internal/catch_fatal_condition_handler.hpp | 1 - src/catch2/internal/catch_main.cpp | 1 - src/catch2/internal/catch_run_context.cpp | 1 - src/catch2/internal/catch_section.hpp | 1 - src/catch2/internal/catch_source_line_info.cpp | 2 ++ src/catch2/internal/catch_test_registry.cpp | 1 - src/catch2/internal/catch_to_string.hpp | 1 - .../reporters/catch_reporter_registrars.hpp | 1 - .../IntrospectiveTests/CmdLine.tests.cpp | 1 - 20 files changed, 7 insertions(+), 38 deletions(-) diff --git a/src/catch2/benchmark/catch_benchmark.hpp b/src/catch2/benchmark/catch_benchmark.hpp index 28da3286..28664b61 100644 --- a/src/catch2/benchmark/catch_benchmark.hpp +++ b/src/catch2/benchmark/catch_benchmark.hpp @@ -12,7 +12,6 @@ #include #include -#include #include #include #include diff --git a/src/catch2/benchmark/detail/catch_stats.cpp b/src/catch2/benchmark/detail/catch_stats.cpp index 8f13f59a..10511d4c 100644 --- a/src/catch2/benchmark/detail/catch_stats.cpp +++ b/src/catch2/benchmark/detail/catch_stats.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/src/catch2/catch_tag_alias_autoregistrar.hpp b/src/catch2/catch_tag_alias_autoregistrar.hpp index ee73c7a5..c742bcd3 100644 --- a/src/catch2/catch_tag_alias_autoregistrar.hpp +++ b/src/catch2/catch_tag_alias_autoregistrar.hpp @@ -9,7 +9,6 @@ #define CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED #include -#include #include #include diff --git a/src/catch2/catch_translate_exception.hpp b/src/catch2/catch_translate_exception.hpp index f4dc0599..dfd95cd6 100644 --- a/src/catch2/catch_translate_exception.hpp +++ b/src/catch2/catch_translate_exception.hpp @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/src/catch2/internal/catch_clara.hpp b/src/catch2/internal/catch_clara.hpp index 6e3138ae..79f21adf 100644 --- a/src/catch2/internal/catch_clara.hpp +++ b/src/catch2/internal/catch_clara.hpp @@ -8,6 +8,8 @@ #ifndef CATCH_CLARA_HPP_INCLUDED #define CATCH_CLARA_HPP_INCLUDED +#include + #if defined( CATCH_COMPILER_CLANG ) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wweak-vtables" @@ -29,7 +31,6 @@ # endif #endif -#include #include #include #include diff --git a/src/catch2/internal/catch_combined_tu.cpp b/src/catch2/internal/catch_combined_tu.cpp index 71af4cae..bc6043f5 100644 --- a/src/catch2/internal/catch_combined_tu.cpp +++ b/src/catch2/internal/catch_combined_tu.cpp @@ -24,7 +24,6 @@ #include #include -#include #include namespace Catch { @@ -46,7 +45,6 @@ namespace Catch { ////////////////////////////////////////// #include -#include #include namespace Catch { @@ -75,7 +73,6 @@ namespace Catch { // vvv formerly catch_uncaught_exceptions.cpp vvv // //////////////////////////////////////////////////// -#include #include #include @@ -131,7 +128,6 @@ namespace Catch { // vvv formerly catch_startup_exception_registry.cpp vvv // /////////////////////////////////////////////////////////// #include -#include namespace Catch { #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) diff --git a/src/catch2/internal/catch_commandline.cpp b/src/catch2/internal/catch_commandline.cpp index 81787aa9..59b06de9 100644 --- a/src/catch2/internal/catch_commandline.cpp +++ b/src/catch2/internal/catch_commandline.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include #include diff --git a/src/catch2/internal/catch_compiler_capabilities.hpp b/src/catch2/internal/catch_compiler_capabilities.hpp index 16888c74..2f9ee339 100644 --- a/src/catch2/internal/catch_compiler_capabilities.hpp +++ b/src/catch2/internal/catch_compiler_capabilities.hpp @@ -28,22 +28,6 @@ #include #include -#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) -#define CATCH_COMPILER_GCC -#endif - -#if defined(__clang__) -#define CATCH_COMPILER_CLANG -#endif - -#if defined(_MSC_VER) && !defined(__clang__) -#define CATCH_COMPILER_MSC -#endif - -#if defined(__MINGW32__) -#define CATCH_COMPILER_MINGW32 -#endif - #ifdef __cplusplus # if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp index e2a175f1..25af9585 100644 --- a/src/catch2/internal/catch_console_colour.cpp +++ b/src/catch2/internal/catch_console_colour.cpp @@ -4,6 +4,9 @@ // (See accompanying file LICENSE_1_0.txt or copy at // https://www.boost.org/LICENSE_1_0.txt) +#include +#include + // SPDX-License-Identifier: BSL-1.0 #if defined(CATCH_COMPILER_CLANG) # pragma clang diagnostic push @@ -11,7 +14,6 @@ #endif -#include #include #include #include @@ -22,7 +24,6 @@ #include #include #include -#include #include #include diff --git a/src/catch2/internal/catch_enforce.hpp b/src/catch2/internal/catch_enforce.hpp index a12de27c..3f81ef1a 100644 --- a/src/catch2/internal/catch_enforce.hpp +++ b/src/catch2/internal/catch_enforce.hpp @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/src/catch2/internal/catch_exception_translator_registry.cpp b/src/catch2/internal/catch_exception_translator_registry.cpp index 603d00c2..acddea6e 100644 --- a/src/catch2/internal/catch_exception_translator_registry.cpp +++ b/src/catch2/internal/catch_exception_translator_registry.cpp @@ -7,7 +7,6 @@ // SPDX-License-Identifier: BSL-1.0 #include #include -#include #include #include #include diff --git a/src/catch2/internal/catch_fatal_condition_handler.hpp b/src/catch2/internal/catch_fatal_condition_handler.hpp index 1d5d2196..389dab5d 100644 --- a/src/catch2/internal/catch_fatal_condition_handler.hpp +++ b/src/catch2/internal/catch_fatal_condition_handler.hpp @@ -10,7 +10,6 @@ #include #include -#include #include diff --git a/src/catch2/internal/catch_main.cpp b/src/catch2/internal/catch_main.cpp index 373d838f..f523bbfa 100644 --- a/src/catch2/internal/catch_main.cpp +++ b/src/catch2/internal/catch_main.cpp @@ -7,7 +7,6 @@ // SPDX-License-Identifier: BSL-1.0 #include #include -#include #include #include #include diff --git a/src/catch2/internal/catch_run_context.cpp b/src/catch2/internal/catch_run_context.cpp index 40836a61..6a32cdc1 100644 --- a/src/catch2/internal/catch_run_context.cpp +++ b/src/catch2/internal/catch_run_context.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include diff --git a/src/catch2/internal/catch_section.hpp b/src/catch2/internal/catch_section.hpp index f6b3ed80..2e72923c 100644 --- a/src/catch2/internal/catch_section.hpp +++ b/src/catch2/internal/catch_section.hpp @@ -9,7 +9,6 @@ #define CATCH_SECTION_HPP_INCLUDED #include -#include #include #include #include diff --git a/src/catch2/internal/catch_source_line_info.cpp b/src/catch2/internal/catch_source_line_info.cpp index 1f8c5966..53c4e5c1 100644 --- a/src/catch2/internal/catch_source_line_info.cpp +++ b/src/catch2/internal/catch_source_line_info.cpp @@ -10,6 +10,8 @@ #include #include +#include + namespace Catch { bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept { diff --git a/src/catch2/internal/catch_test_registry.cpp b/src/catch2/internal/catch_test_registry.cpp index 5fa87b53..faadb101 100644 --- a/src/catch2/internal/catch_test_registry.cpp +++ b/src/catch2/internal/catch_test_registry.cpp @@ -7,7 +7,6 @@ // SPDX-License-Identifier: BSL-1.0 #include #include -#include #include #include #include diff --git a/src/catch2/internal/catch_to_string.hpp b/src/catch2/internal/catch_to_string.hpp index 069ca72c..d8ff35cf 100644 --- a/src/catch2/internal/catch_to_string.hpp +++ b/src/catch2/internal/catch_to_string.hpp @@ -11,7 +11,6 @@ #include #include -#include #include namespace Catch { diff --git a/src/catch2/reporters/catch_reporter_registrars.hpp b/src/catch2/reporters/catch_reporter_registrars.hpp index 49f49f45..31ecb080 100644 --- a/src/catch2/reporters/catch_reporter_registrars.hpp +++ b/src/catch2/reporters/catch_reporter_registrars.hpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp index c910664c..e7b0c9c1 100644 --- a/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp @@ -16,7 +16,6 @@ #include #include #include -#include namespace {