Fix #739 correct cppcorecheck warnings for clang-cl

This commit is contained in:
Roelf-Jilling 2018-10-15 15:42:18 +02:00
parent 1995e86d1a
commit 419ea60e3e
2 changed files with 10 additions and 10 deletions

View File

@ -22,17 +22,17 @@
// //
// make suppress attributes parse for some compilers // make suppress attributes parse for some compilers
// Hopefully temporary until suppresion standardization occurs // Hopefully temporary until suppression standardization occurs
// //
#if defined (_MSC_VER)
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#if defined(__clang__) #if defined(__clang__)
#define GSL_SUPPRESS(x) [[gsl::suppress("x")]] #define GSL_SUPPRESS(x) [[gsl::suppress("x")]]
#else #else
#if defined (_MSC_VER)
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#define GSL_SUPPRESS(x) #define GSL_SUPPRESS(x)
#endif // __clang__
#endif // _MSC_VER #endif // _MSC_VER
#endif // __clang__
// //
// Temporary until MSVC STL supports no-exceptions mode. // Temporary until MSVC STL supports no-exceptions mode.

View File

@ -19,17 +19,17 @@
// //
// make suppress attributes work for some compilers // make suppress attributes work for some compilers
// Hopefully temporary until suppresion standardization occurs // Hopefully temporary until suppression standardization occurs
// //
#if defined(_MSC_VER)
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#if defined(__clang__) #if defined(__clang__)
#define GSL_SUPPRESS(x) [[gsl::suppress("x")]] #define GSL_SUPPRESS(x) [[gsl::suppress("x")]]
#else #else
#if defined(_MSC_VER)
#define GSL_SUPPRESS(x) [[gsl::suppress(x)]]
#else
#define GSL_SUPPRESS(x) #define GSL_SUPPRESS(x)
#endif // __clang__
#endif // _MSC_VER #endif // _MSC_VER
#endif // __clang__
#include <type_traits> #include <type_traits>