[libcxx] r344829 - [libcxx] [test] Don't detect Windows' UCRT with TEST_COMPILER_C1XX

Billy Robert O'Neal III bion at microsoft.com
Fri Oct 19 20:35:46 PDT 2018


Author: bion
Date: Fri Oct 19 20:35:45 2018
New Revision: 344829

URL: http://llvm.org/viewvc/llvm-project?rev=344829&view=rev
Log:
[libcxx] [test] Don't detect Windows' UCRT with TEST_COMPILER_C1XX

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.

Modified:
    libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
    libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp

Modified: libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp?rev=344829&r1=344828&r2=344829&view=diff
==============================================================================
--- libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.c.headers/stdlib_h.pass.cpp Fri Oct 19 20:35:45 2018
@@ -87,11 +87,9 @@ int main()
     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), "");
     static_assert((std::is_same<decltype(free(0)), void>::value), "");

Modified: libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp?rev=344829&r1=344828&r2=344829&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.runtime/cstdlib.pass.cpp Fri Oct 19 20:35:45 2018
@@ -75,10 +75,8 @@ int main()
     static_assert((std::is_same<decltype(std::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)
-    static_assert((std::is_same<decltype(std::aligned_alloc(0,0)), void*>::value), "");
-#endif
+#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
 
     static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), "");




More information about the libcxx-commits mailing list