From 59d010b584fb82c43c99299179814548df4db47b Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Fri, 16 Jun 2017 13:59:23 -0700 Subject: [PATCH] Revert D4567233: [Folly] Drop support for Clang < 3.9 Summary: This reverts commit cd94c711f0390d249b6736ab292721a477022b02 Differential Revision: D4567233 fbshipit-source-id: a10aff6b4c231666aec9f40ab65e881c3cd870dc --- folly/Range.h | 2 ++ folly/test/ExpectedTest.cpp | 5 +++-- folly/test/OptionalTest.cpp | 5 +++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/folly/Range.h b/folly/Range.h index ca3731e1..f80e635d 100644 --- a/folly/Range.h +++ b/folly/Range.h @@ -206,7 +206,9 @@ public: constexpr Range(Iter start, size_t 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; +# endif template ::type = 0> constexpr /* implicit */ Range(Iter str) diff --git a/folly/test/ExpectedTest.cpp b/folly/test/ExpectedTest.cpp index da2ede70..d8291d0f 100644 --- a/folly/test/ExpectedTest.cpp +++ b/folly/test/ExpectedTest.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include @@ -452,7 +453,7 @@ TEST(Expected, MakeOptional) { EXPECT_EQ(**exIntPtr, 3); } -#if __clang__ +#if __CLANG_PREREQ(3, 6) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wself-move" #endif @@ -467,7 +468,7 @@ TEST(Expected, SelfAssignment) { ASSERT_TRUE(b.hasValue() && b.value() == "23333333"); } -#if __clang__ +#if __CLANG_PREREQ(3, 6) #pragma clang diagnostic pop #endif diff --git a/folly/test/OptionalTest.cpp b/folly/test/OptionalTest.cpp index 5243e5e5..ed84f753 100644 --- a/folly/test/OptionalTest.cpp +++ b/folly/test/OptionalTest.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include @@ -520,7 +521,7 @@ TEST(Optional, MakeOptional) { EXPECT_EQ(**optIntPtr, 3); } -#if __clang__ +#if __CLANG_PREREQ(3, 6) # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wself-move" #endif @@ -535,7 +536,7 @@ TEST(Optional, SelfAssignment) { ASSERT_TRUE(b.hasValue() && b.value() == 23333333); } -#if __clang__ +#if __CLANG_PREREQ(3, 6) # pragma clang diagnostic pop #endif -- 2.34.1