1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is dual licensed under the MIT and the University of Illinois Open 6// Source Licenses. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10// test <setjmp.h> 11 12#include <setjmp.h> 13#include <type_traits> 14 15#ifndef setjmp 16#error setjmp not defined 17#endif 18 19int main() 20{ 21 jmp_buf jb; 22 ((void)jb); // Prevent unused warning 23 static_assert((std::is_same<decltype(longjmp(jb, 0)), void>::value), 24 "std::is_same<decltype(longjmp(jb, 0)), void>::value"); 25} 26