mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge pull request #281 from neilmacintosh/master
Suppressed CppCoreCheck warnings.
This commit is contained in:
commit
a9f865900d
@ -31,6 +31,9 @@
|
|||||||
#pragma push_macro("constexpr")
|
#pragma push_macro("constexpr")
|
||||||
#define constexpr
|
#define constexpr
|
||||||
|
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4127) // conditional expression is constant
|
||||||
|
|
||||||
// MSVC 2013 workarounds
|
// MSVC 2013 workarounds
|
||||||
#if _MSC_VER <= 1800
|
#if _MSC_VER <= 1800
|
||||||
// noexcept is not understood
|
// noexcept is not understood
|
||||||
@ -40,7 +43,6 @@
|
|||||||
// turn off some misguided warnings
|
// turn off some misguided warnings
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4351) // warns about newly introduced aggregate initializer behavior
|
#pragma warning(disable: 4351) // warns about newly introduced aggregate initializer behavior
|
||||||
#pragma warning(disable: 4127) // conditional expression is constant
|
|
||||||
|
|
||||||
#endif // _MSC_VER <= 1800
|
#endif // _MSC_VER <= 1800
|
||||||
|
|
||||||
@ -131,6 +133,8 @@ constexpr typename Cont::value_type& at(Cont& cont, size_t index)
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
|
#pragma warning(pop)
|
||||||
|
|
||||||
#undef constexpr
|
#undef constexpr
|
||||||
#pragma pop_macro("constexpr")
|
#pragma pop_macro("constexpr")
|
||||||
|
|
||||||
|
@ -37,10 +37,16 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
// turn off some warnings that are noisy about our Expects statements
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
|
|
||||||
|
// turn off some warnings that are noisy about our Expects statements
|
||||||
#pragma warning(disable : 4127) // conditional expression is constant
|
#pragma warning(disable : 4127) // conditional expression is constant
|
||||||
|
|
||||||
|
// blanket turn off warnings from CppCoreCheck for now
|
||||||
|
// so people aren't annoyed by them when running the tool.
|
||||||
|
// more targeted suppressions will be added in a future update to the GSL
|
||||||
|
#pragma warning(disable: 26481 26482 26483 26485 26490 26491 26492 26493 26495)
|
||||||
|
|
||||||
// No MSVC does constexpr fully yet
|
// No MSVC does constexpr fully yet
|
||||||
#pragma push_macro("constexpr")
|
#pragma push_macro("constexpr")
|
||||||
#define constexpr
|
#define constexpr
|
||||||
|
@ -31,6 +31,14 @@
|
|||||||
#pragma push_macro("constexpr")
|
#pragma push_macro("constexpr")
|
||||||
#define constexpr /* nothing */
|
#define constexpr /* nothing */
|
||||||
|
|
||||||
|
#pragma warning(push)
|
||||||
|
|
||||||
|
// blanket turn off warnings from CppCoreCheck for now
|
||||||
|
// so people aren't annoyed by them when running the tool.
|
||||||
|
// more targeted suppressions will be added in a future update to the GSL
|
||||||
|
#pragma warning(disable: 26481 26482 26483 26485 26490 26491 26492 26493 26495)
|
||||||
|
|
||||||
|
|
||||||
// VS 2013 workarounds
|
// VS 2013 workarounds
|
||||||
#if _MSC_VER <= 1800
|
#if _MSC_VER <= 1800
|
||||||
|
|
||||||
@ -930,12 +938,14 @@ bool operator>=(const T& one, gsl::basic_string_span<CharT, Extent> other) noexc
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// VS 2013 workarounds
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
|
#pragma warning(pop)
|
||||||
|
|
||||||
#undef constexpr
|
#undef constexpr
|
||||||
#pragma pop_macro("constexpr")
|
#pragma pop_macro("constexpr")
|
||||||
|
|
||||||
|
// VS 2013 workarounds
|
||||||
#if _MSC_VER <= 1800
|
#if _MSC_VER <= 1800
|
||||||
|
|
||||||
#ifndef GSL_THROW_ON_CONTRACT_VIOLATION
|
#ifndef GSL_THROW_ON_CONTRACT_VIOLATION
|
||||||
|
Loading…
Reference in New Issue
Block a user