1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
13 #include <type_traits>
15 int main(int, char**) {
19 // First time we set the buffer, the function should return 0
23 // If it returned 42, then we're coming from the std::longjmp call below
27 // Otherwise, something is wrong
33 static_assert(std::is_same
<decltype(std::longjmp(jb
, 0)), void>::value
, "");