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), "");


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), "");
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D53466: [l... Billy Robert O'Neal III via Phabricator via cfe-commits

Reply via email to