Suppress shadowing warnings

This commit is contained in:
Victor Zverovich 2017-08-21 06:50:57 -07:00
parent 466386d5cd
commit 07f8ffc44f
2 changed files with 11 additions and 7 deletions

View File

@ -58,6 +58,10 @@
# define FMT_CATCH(x) if (false)
#endif
// Disable the warning about declaration shadowing because it affects too
// many valid cases.
#pragma GCC diagnostic ignored "-Wshadow"
#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable: 4127) // conditional expression is constant

View File

@ -3766,6 +3766,13 @@ operator"" _a(const wchar_t *s, std::size_t) { return {s}; }
} // namespace fmt
#endif // FMT_USE_USER_DEFINED_LITERALS
#ifdef FMT_HEADER_ONLY
# define FMT_FUNC inline
# include "format.cc"
#else
# define FMT_FUNC
#endif
// Restore warnings.
#if FMT_GCC_VERSION >= 406
# pragma GCC diagnostic pop
@ -3775,11 +3782,4 @@ operator"" _a(const wchar_t *s, std::size_t) { return {s}; }
# pragma clang diagnostic pop
#endif
#ifdef FMT_HEADER_ONLY
# define FMT_FUNC inline
# include "format.cc"
#else
# define FMT_FUNC
#endif
#endif // FMT_FORMAT_H_