Commit 59d010b5 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Revert D4567233: [Folly] Drop support for Clang < 3.9

Summary: This reverts commit cd94c711f0390d249b6736ab292721a477022b02

Differential Revision: D4567233

fbshipit-source-id: a10aff6b4c231666aec9f40ab65e881c3cd870dc
parent 030e254e
...@@ -206,7 +206,9 @@ public: ...@@ -206,7 +206,9 @@ public:
constexpr Range(Iter start, size_t size) constexpr Range(Iter start, size_t size)
: b_(start), e_(start + size) { } : b_(start), e_(start + size) { }
# if !__clang__ || __CLANG_PREREQ(3, 7) // Clang 3.6 crashes on this line
/* implicit */ Range(std::nullptr_t) = delete; /* implicit */ Range(std::nullptr_t) = delete;
# endif
template <class T = Iter, typename detail::IsCharPointer<T>::type = 0> template <class T = Iter, typename detail::IsCharPointer<T>::type = 0>
constexpr /* implicit */ Range(Iter str) constexpr /* implicit */ Range(Iter str)
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <folly/Expected.h> #include <folly/Expected.h>
#include <folly/Portability.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <algorithm> #include <algorithm>
...@@ -452,7 +453,7 @@ TEST(Expected, MakeOptional) { ...@@ -452,7 +453,7 @@ TEST(Expected, MakeOptional) {
EXPECT_EQ(**exIntPtr, 3); EXPECT_EQ(**exIntPtr, 3);
} }
#if __clang__ #if __CLANG_PREREQ(3, 6)
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wself-move" #pragma clang diagnostic ignored "-Wself-move"
#endif #endif
...@@ -467,7 +468,7 @@ TEST(Expected, SelfAssignment) { ...@@ -467,7 +468,7 @@ TEST(Expected, SelfAssignment) {
ASSERT_TRUE(b.hasValue() && b.value() == "23333333"); ASSERT_TRUE(b.hasValue() && b.value() == "23333333");
} }
#if __clang__ #if __CLANG_PREREQ(3, 6)
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif #endif
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <folly/Optional.h> #include <folly/Optional.h>
#include <folly/Portability.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <algorithm> #include <algorithm>
...@@ -520,7 +521,7 @@ TEST(Optional, MakeOptional) { ...@@ -520,7 +521,7 @@ TEST(Optional, MakeOptional) {
EXPECT_EQ(**optIntPtr, 3); EXPECT_EQ(**optIntPtr, 3);
} }
#if __clang__ #if __CLANG_PREREQ(3, 6)
# pragma clang diagnostic push # pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wself-move" # pragma clang diagnostic ignored "-Wself-move"
#endif #endif
...@@ -535,7 +536,7 @@ TEST(Optional, SelfAssignment) { ...@@ -535,7 +536,7 @@ TEST(Optional, SelfAssignment) {
ASSERT_TRUE(b.hasValue() && b.value() == 23333333); ASSERT_TRUE(b.hasValue() && b.value() == 23333333);
} }
#if __clang__ #if __CLANG_PREREQ(3, 6)
# pragma clang diagnostic pop # pragma clang diagnostic pop
#endif #endif
......
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