//===----------------------------------------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// // // UNSUPPORTED: c++03, c++11, c++14, c++17 // These compiler versions and platforms don't enable sized deallocation by default. // ADDITIONAL_COMPILE_FLAGS(target=x86_64-w64-windows-gnu): -fsized-deallocation // ADDITIONAL_COMPILE_FLAGS(target=i686-w64-windows-gnu): -fsized-deallocation // This test will fail with ASan if the implementation passes different sizes // to corresponding allocation and deallocation functions. #include int main(int, char**) { (void)std::allocate_shared(std::allocator{}, 10); (void)std::make_shared(10); (void)std::allocate_shared(std::allocator{}); (void)std::make_shared(); return 0; }