Commit e8d25954 authored by Arkadiy Shapkin's avatar Arkadiy Shapkin Committed by Facebook Github Bot

Fix FBString with MSVC

Summary: Closes https://github.com/facebook/folly/pull/588

Reviewed By: ericniebler

Differential Revision: D5029876

Pulled By: yfeldblum

fbshipit-source-id: 6a8f16373dcfb1c7b2741eb808da0f6dbc4207b6
parent abc55483
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <folly/Hash.h> #include <folly/Hash.h>
#include <folly/Malloc.h> #include <folly/Malloc.h>
#include <folly/Traits.h> #include <folly/Traits.h>
#include <folly/portability/BitsFunctexcept.h>
#if FOLLY_HAVE_DEPRECATED_ASSOC #if FOLLY_HAVE_DEPRECATED_ASSOC
#ifdef _GLIBCXX_SYMVER #ifdef _GLIBCXX_SYMVER
...@@ -79,13 +80,13 @@ ...@@ -79,13 +80,13 @@
#define FBSTRING_UNLIKELY(x) (x) #define FBSTRING_UNLIKELY(x) (x)
#endif #endif
#pragma GCC diagnostic push FOLLY_PUSH_WARNING
// Ignore shadowing warnings within this file, so includers can use -Wshadow. // Ignore shadowing warnings within this file, so includers can use -Wshadow.
#pragma GCC diagnostic ignored "-Wshadow" FOLLY_GCC_DISABLE_WARNING("-Wshadow")
// GCC 4.9 has a false positive in setSmallSize (probably // GCC 4.9 has a false positive in setSmallSize (probably
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124), disable // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124), disable
// compile-time array bound checking. // compile-time array bound checking.
#pragma GCC diagnostic ignored "-Warray-bounds" FOLLY_GCC_DISABLE_WARNING("-Warray-bounds")
// FBString cannot use throw when replacing std::string, though it may still // FBString cannot use throw when replacing std::string, though it may still
// use std::__throw_* // use std::__throw_*
...@@ -2888,7 +2889,7 @@ FOLLY_FBSTRING_HASH ...@@ -2888,7 +2889,7 @@ FOLLY_FBSTRING_HASH
#endif // _LIBSTDCXX_FBSTRING #endif // _LIBSTDCXX_FBSTRING
#pragma GCC diagnostic pop FOLLY_POP_WARNING
#undef FBSTRING_DISABLE_SSO #undef FBSTRING_DISABLE_SSO
#undef FBSTRING_SANITIZE_ADDRESS #undef FBSTRING_SANITIZE_ADDRESS
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include <folly/portability/Windows.h> #include <folly/portability/Windows.h>
// Ignore -Wformat-nonliteral warnings within this file // Ignore -Wformat-nonliteral warnings within this file
#pragma GCC diagnostic push FOLLY_PUSH_WARNING
#pragma GCC diagnostic ignored "-Wformat-nonliteral" FOLLY_GCC_DISABLE_WARNING("-Wformat-nonliteral")
namespace folly { namespace folly {
...@@ -1127,4 +1127,4 @@ typename std::enable_if<IsSomeString<Tgt>::value>::type toAppend( ...@@ -1127,4 +1127,4 @@ typename std::enable_if<IsSomeString<Tgt>::value>::type toAppend(
} // namespace folly } // namespace folly
#pragma GCC diagnostic pop FOLLY_POP_WARNING
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
#include <folly/Traits.h> #include <folly/Traits.h>
// Ignore shadowing warnings within this file, so includers can use -Wshadow. // Ignore shadowing warnings within this file, so includers can use -Wshadow.
#pragma GCC diagnostic push FOLLY_PUSH_WARNING
#pragma GCC diagnostic ignored "-Wshadow" FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly { namespace folly {
...@@ -460,4 +460,4 @@ vformatChecked(Str* out, StringPiece fmt, Container&& container) { ...@@ -460,4 +460,4 @@ vformatChecked(Str* out, StringPiece fmt, Container&& container) {
#include <folly/Format-inl.h> #include <folly/Format-inl.h>
#pragma GCC diagnostic pop FOLLY_POP_WARNING
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
#include <folly/detail/RangeSse42.h> #include <folly/detail/RangeSse42.h>
// Ignore shadowing warnings within this file, so includers can use -Wshadow. // Ignore shadowing warnings within this file, so includers can use -Wshadow.
#pragma GCC diagnostic push FOLLY_PUSH_WARNING
#pragma GCC diagnostic ignored "-Wshadow" FOLLY_GCC_DISABLE_WARNING("-Wshadow")
namespace folly { namespace folly {
...@@ -1268,6 +1268,6 @@ template <class T> struct IsSomeString { ...@@ -1268,6 +1268,6 @@ template <class T> struct IsSomeString {
} // !namespace folly } // !namespace folly
#pragma GCC diagnostic pop FOLLY_POP_WARNING
FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(folly::Range); FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(folly::Range);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment