From 647dba2fab8a44aa949560dcbaa14ab31ac1ee83 Mon Sep 17 00:00:00 2001 From: Marko Novakovic Date: Thu, 3 Aug 2017 23:02:17 -0700 Subject: [PATCH] Replacing instances of __CLANG__ with __clang__ Summary: Clang compiler does not define `__CLANG__` macro and only defines `__clang__`, but we use `__CLANG__` in a few places in the code which was probably done by mistake. This should make the code behave in the intended way. Reviewed By: yfeldblum Differential Revision: D5542162 fbshipit-source-id: 74d24ba9464d8faec160d73e6c582967d3c80c19 --- folly/FixedString.h | 4 ++-- folly/UncaughtExceptions.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/FixedString.h b/folly/FixedString.h index c6925bbf..8964a4b1 100644 --- a/folly/FixedString.h +++ b/folly/FixedString.h @@ -103,7 +103,7 @@ enum class Cmp : int { LT = -1, EQ = 0, GT = 1 }; // Rather annoyingly, GCC's -Warray-bounds warning issues false positives for // this code. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61971 -#if defined(__GNUC__) && !defined(__CLANG__) && __GNUC__ <= 5 +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 5 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Warray-bounds" #endif @@ -302,7 +302,7 @@ struct Helper { } }; -#if defined(__GNUC__) && !defined(__CLANG__) && __GNUC__ <= 4 +#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 4 #pragma GCC diagnostic pop #endif diff --git a/folly/UncaughtExceptions.h b/folly/UncaughtExceptions.h index 808710aa..b9dd5fae 100644 --- a/folly/UncaughtExceptions.h +++ b/folly/UncaughtExceptions.h @@ -18,7 +18,7 @@ #include -#if defined(__GNUG__) || defined(__CLANG__) +#if defined(__GNUG__) || defined(__clang__) #define FOLLY_EXCEPTION_COUNT_USE_CXA_GET_GLOBALS namespace __cxxabiv1 { // forward declaration (originally defined in unwind-cxx.h from from libstdc++) -- 2.34.1