From 82b0ac4f1f8b41afc94b4cd0a748482a2ccef850 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sun, 18 Oct 2020 16:05:01 +0100 Subject: [PATCH] [libc++] Fix aligned_alloc tests FreeBSD On FreeBSD we get the following error when passing zero as the requested alignment: error: requested alignment is not a power of 2 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D88820 --- libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp | 3 ++- libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp index 49f17d6..be43647 100644 --- a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp @@ -133,7 +133,8 @@ int main(int, char**) static_assert((std::is_same::value), ""); #if TEST_STD_VER > 14 && defined(TEST_HAS_ALIGNED_ALLOC) - static_assert((std::is_same::value), ""); + static_assert((std::is_same::value), + ""); #endif static_assert((std::is_same::value), ""); diff --git a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp index da0e3c0..72a3cf8 100644 --- a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp +++ b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp @@ -120,7 +120,8 @@ int main(int, char**) static_assert((std::is_same::value), ""); #if TEST_STD_VER > 14 && defined(TEST_HAS_ALIGNED_ALLOC) - static_assert((std::is_same::value), ""); + static_assert( + (std::is_same::value), ""); #endif static_assert((std::is_same::value), ""); -- 2.7.4