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

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 14 10:41:17 PDT 2018


jfb accepted this revision.
jfb added a comment.
This revision is now accepted and ready to land.

>From `__ISO_C_VISIBLE >= 2011` it looks like this tries to test C11 features regardless of the C++ version. That's probably fine, but we're walking this line where only C++17 really guarantees C11 support, so this entire thing is weird and brittle to me. You're not changing the brittle-ness, just removing one kink, so from that perspective this change LGTM.



================
Comment at: libcxx/test/support/test_macros.h:127
 // 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__)
----------------
Should this be `TEST_STD_VER >= 11`?


Repository:
  rCXX libc++

https://reviews.llvm.org/D50719





More information about the cfe-commits mailing list