mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 06:46:10 +01:00
fix some bugprone-macro-parentheses warnings
When using the public headers of catch2 in another project that uses clang-tidy with some checks enabled, then some warnings in catch2's headers are also reported. This fixes a bunch of bugprone-macro-parentheses warnings. See: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html
This commit is contained in:
parent
f161110be4
commit
0fb817e41f
@ -34,7 +34,7 @@
|
||||
#else // CATCH_CONFIG_FAST_COMPILE
|
||||
|
||||
#define INTERNAL_CATCH_TRY try
|
||||
#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); }
|
||||
#define INTERNAL_CATCH_CATCH( handler ) catch(...) { (handler).handleUnexpectedInflightException(); }
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -113,7 +113,7 @@ static int catchInternalSectionHint = 0;
|
||||
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
static const Catch::Detail::DummyUse INTERNAL_CATCH_UNIQUE_NAME( \
|
||||
dummyUser )( &fname ); \
|
||||
dummyUser )( &(fname) ); \
|
||||
CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
|
||||
static void fname( [[maybe_unused]] int catchInternalSectionHint ) \
|
||||
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
|
||||
|
Loading…
Reference in New Issue
Block a user