brintos

brintos / llvm-project-archived public Read only

0
0
Text · 807 B · f14173a Raw
25 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// MSVC warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable10// ADDITIONAL_COMPILE_FLAGS(cl-style-warnings): /wd461111 12// test <setjmp.h>13//14// Even though <setjmp.h> is not provided by libc++, we still test that15// using it with libc++ on the search path will work.16 17#include <setjmp.h>18 19#include "test_macros.h"20 21jmp_buf jb;22ASSERT_SAME_TYPE(void, decltype(longjmp(jb, 0)));23 24void f() { setjmp(jb); }25