Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/catch2/catch_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
#include <catch2/internal/catch_commandline.hpp>
#include <catch2/internal/catch_compare_traits.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS
#include <catch2/internal/catch_config_android_logwrite.hpp>
#include <catch2/internal/catch_config_counter.hpp>
#include <catch2/internal/catch_config_prefix_messages.hpp>
Expand Down Expand Up @@ -138,4 +141,6 @@
#include <catch2/matchers/catch_matchers_all.hpp>
#include <catch2/reporters/catch_reporters_all.hpp>

CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

#endif // CATCH_ALL_HPP_INCLUDED
8 changes: 8 additions & 0 deletions src/catch2/catch_session.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#ifndef CATCH_SESSION_HPP_INCLUDED
#define CATCH_SESSION_HPP_INCLUDED

#include <catch2/internal/catch_compiler_capabilities.hpp>

CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS

#include <catch2/internal/catch_commandline.hpp>
#include <catch2/internal/catch_noncopyable.hpp>
#include <catch2/catch_config.hpp>
Expand Down Expand Up @@ -67,4 +73,6 @@ namespace Catch {

} // end namespace Catch

CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

#endif // CATCH_SESSION_HPP_INCLUDED
7 changes: 7 additions & 0 deletions src/catch2/catch_template_test_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#ifndef CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED
#define CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED

#include <catch2/internal/catch_compiler_capabilities.hpp>

// We need this suppression to leak, because it took until GCC 10
// for the front end to handle local suppression via _Pragma properly
// inside templates (so `TEMPLATE_TEST_CASE` and co).
Expand All @@ -16,6 +18,10 @@
#pragma GCC diagnostic ignored "-Wparentheses"
#endif

CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS


#include <catch2/catch_test_macros.hpp>
#include <catch2/internal/catch_template_test_registry.hpp>
Expand Down Expand Up @@ -120,5 +126,6 @@

#endif // end of user facing macro declarations

CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

#endif // CATCH_TEMPLATE_TEST_MACROS_HPP_INCLUDED
8 changes: 8 additions & 0 deletions src/catch2/catch_test_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#ifndef CATCH_TEST_MACROS_HPP_INCLUDED
#define CATCH_TEST_MACROS_HPP_INCLUDED

#include <catch2/internal/catch_compiler_capabilities.hpp>

CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS

#include <catch2/internal/catch_test_macro_impl.hpp>
#include <catch2/catch_message.hpp>
#include <catch2/catch_user_config.hpp>
Expand Down Expand Up @@ -240,4 +246,6 @@

// end of user facing macros

CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

#endif // CATCH_TEST_MACROS_HPP_INCLUDED
8 changes: 8 additions & 0 deletions src/catch2/generators/catch_generators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#ifndef CATCH_GENERATORS_HPP_INCLUDED
#define CATCH_GENERATORS_HPP_INCLUDED

#include <catch2/internal/catch_compiler_capabilities.hpp>

CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS

#include <catch2/catch_tostring.hpp>
#include <catch2/generators/catch_generators_throw.hpp>
#include <catch2/interfaces/catch_interfaces_generatortracker.hpp>
Expand Down Expand Up @@ -258,4 +264,6 @@ namespace Generators {
CATCH_INTERNAL_LINEINFO, \
[&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) //NOLINT(google-build-using-namespace)

CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

#endif // CATCH_GENERATORS_HPP_INCLUDED
12 changes: 12 additions & 0 deletions src/catch2/internal/catch_compiler_capabilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
_Pragma( "GCC diagnostic ignored \"-Wshadow\"" )

# define CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS \
_Pragma( "GCC diagnostic ignored \"-Weffc++\"" )

# define CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS \
_Pragma( "GCC diagnostic ignored \"-Wctor-dtor-privacy\"" )

# define CATCH_INTERNAL_CONFIG_USE_BUILTIN_CONSTANT_P

#endif
Expand Down Expand Up @@ -429,6 +435,12 @@
#if !defined( CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS )
# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS
#endif
#if !defined( CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS )
# define CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
#endif
#if !defined( CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS )
# define CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS
#endif

#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10)
# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
Expand Down
8 changes: 8 additions & 0 deletions src/catch2/matchers/catch_matchers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
#ifndef CATCH_MATCHERS_HPP_INCLUDED
#define CATCH_MATCHERS_HPP_INCLUDED

#include <catch2/internal/catch_compiler_capabilities.hpp>

CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
CATCH_INTERNAL_SUPPRESS_EFFCPP_WARNINGS
CATCH_INTERNAL_SUPPRESS_CTOR_DTOR_PRIVACY_WARNINGS

#include <catch2/matchers/internal/catch_matchers_impl.hpp>
#include <catch2/internal/catch_move_and_forward.hpp>
#include <catch2/internal/catch_lifetimebound.hpp>
Expand Down Expand Up @@ -250,4 +256,6 @@ namespace Matchers {

#endif // end of user facing macro declarations

CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION

#endif // CATCH_MATCHERS_HPP_INCLUDED