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 #include "test_macros.h"
15 
16 #ifndef setjmp
17 #error setjmp not defined
18 #endif
19 
main(int,char **)20 int main(int, char**)
21 {
22     std::jmp_buf jb;
23     ((void)jb); // Prevent unused warning
24     static_assert((std::is_same<decltype(std::longjmp(jb, 0)), void>::value),
25                   "std::is_same<decltype(std::longjmp(jb, 0)), void>::value");
26 
27   return 0;
28 }
29