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 //===----------------------------------------------------------------------===//
8 
9 // test <csetjmp>
10 
11 #include <csetjmp>
12 #include <type_traits>
13 
14 #ifndef setjmp
15 #error setjmp not defined
16 #endif
17 
18 int main(int, char**)
19 {
20     std::jmp_buf jb;
21     ((void)jb); // Prevent unused warning
22     static_assert((std::is_same<decltype(std::longjmp(jb, 0)), void>::value),
23                   "std::is_same<decltype(std::longjmp(jb, 0)), void>::value");
24 
25   return 0;
26 }
27