[PATCH] D53466: [libcxx] [test] Don't detect Windows' UCRT with TEST_COMPILER_C1XX

Billy Robert O'Neal III via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 19 18:31:51 PDT 2018


BillyONeal created this revision.
BillyONeal added reviewers: EricWF, mclow.lists.

The test is trying to avoid saying aligned_alloc on Windows' UCRT, which does not (and can not) implement aligned_alloc. However, it's testing for c1xx, meaning clang on Windows will fail this test when using the UCRT.


https://reviews.llvm.org/D53466

Files:
  test/std/depr/depr.c.headers/stdlib_h.pass.cpp


Index: test/std/depr/depr.c.headers/stdlib_h.pass.cpp
===================================================================
--- test/std/depr/depr.c.headers/stdlib_h.pass.cpp
+++ test/std/depr/depr.c.headers/stdlib_h.pass.cpp
@@ -87,10 +87,8 @@
     static_assert((std::is_same<decltype(srand(0)), void>::value), "");
 
 //  Microsoft does not implement aligned_alloc in their C library
-#ifndef TEST_COMPILER_C1XX
-#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
+#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && !defined(_WIN32)
     static_assert((std::is_same<decltype(aligned_alloc(0,0)), void*>::value), "");
-#endif
 #endif
 
     static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53466.170289.patch
Type: text/x-patch
Size: 726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181020/8106459a/attachment.bin>


More information about the cfe-commits mailing list