[LVI] Add trunc to i1 handling. (#124480)
[llvm-project.git] / libcxx / test / std / depr / depr.c.headers / setjmp_h.compile.pass.cpp
blobf14173a7531663335f5d5e397f9e5d00a7e98296
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 // MSVC warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable
10 // ADDITIONAL_COMPILE_FLAGS(cl-style-warnings): /wd4611
12 // test <setjmp.h>
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.
17 #include <setjmp.h>
19 #include "test_macros.h"
21 jmp_buf jb;
22 ASSERT_SAME_TYPE(void, decltype(longjmp(jb, 0)));
24 void f() { setjmp(jb); }