Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / language.support / support.exception / exception.terminate / terminate.handler / terminate_handler.pass.cpp
blob748e71ac13ba2d4e04dfba33be0e3e4abe3954a7
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // test terminate_handler
11 #include <exception>
12 #include <type_traits>
13 #include <cassert>
15 #include "test_macros.h"
17 void f() {}
19 int main(int, char**)
21 static_assert((std::is_same<std::terminate_handler, void(*)()>::value), "");
22 std::terminate_handler p = f;
23 assert(p == &f);
25 return 0;