Replacing instances of __CLANG__ with __clang__
authorMarko Novakovic <mnovakovic@fb.com>
Fri, 4 Aug 2017 06:02:17 +0000 (23:02 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 4 Aug 2017 06:06:12 +0000 (23:06 -0700)
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
folly/UncaughtExceptions.h

index c6925bbf6e2bbcfe25fc391e6e558a0416e8d515..8964a4b16ed0f7b55ad2e5ab6abe6e1c10c65fd2 100644 (file)
@@ -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
 
index 808710aa0288d79500606879ee9d8218deeb5f4a..b9dd5fae6722b419bd9d46e1234d438a2d00a3e3 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <exception>
 
-#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++)