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 | // MSVC warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable |
10 | // ADDITIONAL_COMPILE_FLAGS(cl-style-warnings): /wd4611 |
11 | |
12 | // test <setjmp.h> |
13 | // |
14 | // Even though <setjmp.h> is not provided by libc++, we still test that |
15 | // using it with libc++ on the search path will work. |
16 | |
17 | #include <setjmp.h> |
18 | |
19 | #include "test_macros.h" |
20 | |
21 | jmp_buf jb; |
22 | ASSERT_SAME_TYPE(void, decltype(longjmp(env: jb, val: 0))); |
23 | |
24 | void f() { setjmp(jb); } |
25 | |