[PATCH] D50719: [libc++] Fix incorrect definition of TEST_HAS_C11_FEATURES

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 14 09:36:54 PDT 2018


ldionne created this revision.
ldionne added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added subscribers: cfe-commits, dexonsmith, christof.

The macro was not defined in C++11 mode when it should have been, at least
according to how _LIBCPP_HAS_C11_FEATURES is defined.


Repository:
  rCXX libc++

https://reviews.llvm.org/D50719

Files:
  libcxx/test/support/test_macros.h


Index: libcxx/test/support/test_macros.h
===================================================================
--- libcxx/test/support/test_macros.h
+++ libcxx/test/support/test_macros.h
@@ -124,7 +124,7 @@
 
 // Sniff out to see if the underling C library has C11 features
 // Note that at this time (July 2018), MacOS X and iOS do NOT.
-#if __ISO_C_VISIBLE >= 2011
+#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
 #  if defined(__FreeBSD__)
 #    define TEST_HAS_C11_FEATURES
 #  elif defined(__Fuchsia__)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50719.160616.patch
Type: text/x-patch
Size: 513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180814/27bd9193/attachment-0001.bin>


More information about the cfe-commits mailing list