Files
clang-p2996/libcxx/test/std/language.support/support.start.term/quick_exit.pass.cpp
Louis Dionne 1bd7c02233 [libc++] Clean up tests for "optional" C11 features
First, add a TEST_HAS_QUICK_EXIT macro to mirror other C11 features like
TEST_HAS_ALIGNED_ALLOC, and update the tests for that.

Second, get rid of TEST_HAS_C11_FEATURES and _LIBCPP_HAS_C11_FEATURES,
which were only used to ensure that feature macros don't get out of
sync between <__config> and "test_macros.h". This is not necessary
anymore, since we have tests for each individual macro now.
2020-07-28 15:13:05 -04:00

27 lines
613 B
C++

//===----------------------------------------------------------------------===//
//
// 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
// test quick_exit and at_quick_exit
#include <cstdlib>
#include "test_macros.h"
void f() {}
int main(int, char**)
{
#ifdef TEST_HAS_QUICK_EXIT
std::at_quick_exit(f);
std::quick_exit(0);
#endif
return 0;
}