Different way of checking for support of local warning suppression

Closes #2474
This commit is contained in:
Martin Hořeňovský 2022-07-12 00:05:56 +02:00
parent 3bd0c58878
commit cc0e91472a
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -63,11 +63,17 @@
# define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" ) # define CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS _Pragma( "nv_diag_suppress 177" )
#endif #endif
// clang-cl defines _MSC_VER as well as __clang__, which could cause the
// start/stop internal suppression macros to be double defined.
#if defined(__clang__) && !defined(_MSC_VER) #if defined(__clang__) && !defined(_MSC_VER)
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) # define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" )
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) # define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" )
#endif // __clang__ && !_MSC_VER
#if defined(__clang__)
// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug // As of this writing, IBM XL's implementation of __builtin_constant_p has a bug
// which results in calls to destructors being emitted for each temporary, // which results in calls to destructors being emitted for each temporary,
// without a matching initialization. In practice, this can result in something // without a matching initialization. In practice, this can result in something