mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-21 06:40:06 +08:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -87,10 +87,8 @@ int main()
|
|||||||
static_assert((std::is_same<decltype(srand(0)), void>::value), "");
|
static_assert((std::is_same<decltype(srand(0)), void>::value), "");
|
||||||
|
|
||||||
// Microsoft does not implement aligned_alloc in their C library
|
// Microsoft does not implement aligned_alloc in their C library
|
||||||
#ifndef TEST_COMPILER_C1XX
|
#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && !defined(_WIN32)
|
||||||
#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
|
|
||||||
static_assert((std::is_same<decltype(aligned_alloc(0,0)), void*>::value), "");
|
static_assert((std::is_same<decltype(aligned_alloc(0,0)), void*>::value), "");
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");
|
static_assert((std::is_same<decltype(calloc(0,0)), void*>::value), "");
|
||||||
|
@@ -75,10 +75,8 @@ int main()
|
|||||||
static_assert((std::is_same<decltype(std::srand(0)), void>::value), "");
|
static_assert((std::is_same<decltype(std::srand(0)), void>::value), "");
|
||||||
|
|
||||||
// Microsoft does not implement aligned_alloc in their C library
|
// Microsoft does not implement aligned_alloc in their C library
|
||||||
#ifndef TEST_COMPILER_C1XX
|
#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && !defined(_WIN32)
|
||||||
#if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES)
|
static_assert((std::is_same<decltype(aligned_alloc(0,0)), void*>::value), "");
|
||||||
static_assert((std::is_same<decltype(std::aligned_alloc(0,0)), void*>::value), "");
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), "");
|
static_assert((std::is_same<decltype(std::calloc(0,0)), void*>::value), "");
|
||||||
|
Reference in New Issue
Block a user