Fix undefined warning errors
authorNate Stedman <natesm@fb.com>
Sat, 1 Jul 2017 01:01:42 +0000 (18:01 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 1 Jul 2017 01:11:05 +0000 (18:11 -0700)
Summary: Xcode 9 is throwing errors because `-Wshadow-local` and `-Wshadow-compatible-local` are undefined in Clang.

Reviewed By: Orvid

Differential Revision: D5356476

fbshipit-source-id: 4cc9f48f796f66decb4beaa66d3e66f486449c19

folly/ExceptionWrapper.h

index 958a3d317a06b8f3f65096b691e90fa5d2430c86..3a2ff7179ca2ac5239b09fb9c0a36091ed935be9 100644 (file)
@@ -34,6 +34,7 @@
 #include <folly/Demangle.h>
 #include <folly/ExceptionString.h>
 #include <folly/FBString.h>
+#include <folly/Portability.h>
 #include <folly/Traits.h>
 
 #ifdef __GNUC__
@@ -42,8 +43,7 @@
 #pragma GCC diagnostic ignored "-Wpotentially-evaluated-expression"
 // GCC gets confused about lambda scopes and issues shadow-local warnings for
 // parameters in totally different functions.
-#pragma GCC diagnostic ignored "-Wshadow-local"
-#pragma GCC diagnostic ignored "-Wshadow-compatible-local"
+FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS
 #endif
 
 #define FOLLY_EXCEPTION_WRAPPER_H_INCLUDED