mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +01:00
Add macro for suppressing Wshadow
This commit is contained in:
parent
b3cf1bfb5d
commit
f60c15364b
@ -59,6 +59,9 @@
|
||||
# define CATCH_INTERNAL_SUPPRESS_USELESS_CAST_WARNINGS \
|
||||
_Pragma( "GCC diagnostic ignored \"-Wuseless-cast\"" )
|
||||
|
||||
# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
|
||||
_Pragma( "GCC diagnostic ignored \"-Wshadow\"" )
|
||||
|
||||
# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
@ -131,6 +134,9 @@
|
||||
# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS \
|
||||
_Pragma( "clang diagnostic ignored \"-Wcomma\"" )
|
||||
|
||||
# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
|
||||
_Pragma( "clang diagnostic ignored \"-Wshadow\"" )
|
||||
|
||||
#endif // __clang__
|
||||
|
||||
|
||||
@ -380,6 +386,16 @@
|
||||
#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS)
|
||||
# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS
|
||||
#endif
|
||||
#if !defined( CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS )
|
||||
# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
|
||||
#endif
|
||||
#if !defined( CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS )
|
||||
# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS
|
||||
#endif
|
||||
#if !defined( CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS )
|
||||
# define CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS
|
||||
#endif
|
||||
|
||||
|
||||
// The goal of this macro is to avoid evaluation of the arguments, but
|
||||
// still have the compiler warn on problems inside...
|
||||
@ -393,13 +409,6 @@
|
||||
# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
|
||||
#endif
|
||||
|
||||
#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS)
|
||||
# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS
|
||||
#endif
|
||||
|
||||
#if !defined(CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS)
|
||||
# define CATCH_INTERNAL_SUPPRESS_COMMA_WARNINGS
|
||||
#endif
|
||||
|
||||
#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
#define CATCH_TRY if ((true))
|
||||
|
Loading…
Reference in New Issue
Block a user