[clang-tools-extra] r344856 - Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 20 10:35:50 PDT 2018


Author: ahatanak
Date: Sat Oct 20 10:35:50 2018
New Revision: 344856

URL: http://llvm.org/viewvc/llvm-project?rev=344856&view=rev
Log:
Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking
whether it is too old.

Modified:
    clang-tools-extra/trunk/unittests/clangd/JSONTransportTests.cpp

Modified: clang-tools-extra/trunk/unittests/clangd/JSONTransportTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/JSONTransportTests.cpp?rev=344856&r1=344855&r2=344856&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/JSONTransportTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/JSONTransportTests.cpp Sat Oct 20 10:35:50 2018
@@ -19,7 +19,9 @@ namespace {
 
 // No fmemopen on windows or on versions of MacOS X earlier than 10.13, so we
 // can't easily run this test.
-#if !(defined(WIN32) || __MAC_OS_X_VERSION_MIN_REQUIRED < 101300)
+#if !(defined(WIN32) || \
+      (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && \
+       __MAC_OS_X_VERSION_MIN_REQUIRED < 101300))
 
 // Fixture takes care of managing the input/output buffers for the transport.
 class JSONTransportTest : public ::testing::Test {




More information about the cfe-commits mailing list