2021-08-18 08:31:40 -04:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
//
|
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
|
//
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
|
|
// test <cstdlib>
|
|
|
|
|
// std::aligned_alloc
|
|
|
|
|
|
|
|
|
|
// UNSUPPORTED: c++03, c++11, c++14
|
|
|
|
|
|
|
|
|
|
// ::aligned_alloc is provided by the C library, but it's marked as unavailable
|
|
|
|
|
// until macOS 10.15
|
2024-06-28 10:40:35 -05:00
|
|
|
// XFAIL: target={{.+}}-apple-macosx10.{{13|14}}
|
2021-08-18 08:31:40 -04:00
|
|
|
|
|
|
|
|
// ::aligned_alloc is not implemented on Windows
|
2021-08-27 10:09:19 +00:00
|
|
|
// XFAIL: target={{.+}}-windows-{{.+}}
|
2021-08-18 08:31:40 -04:00
|
|
|
|
2022-11-02 14:53:51 -07:00
|
|
|
// ::aligned_alloc is available starting with Android P (API 28)
|
|
|
|
|
// XFAIL: target={{.+}}-android{{(eabi)?(21|22|23|24|25|26|27)}}
|
|
|
|
|
|
2021-08-18 08:31:40 -04:00
|
|
|
#include <cstdlib>
|
|
|
|
|
#include <type_traits>
|
|
|
|
|
|
|
|
|
|
static_assert(std::is_same<decltype(std::aligned_alloc(1, 0)), void*>::value, "");
|