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 unexpected 11 12 #include <exception> 13 #include <cstdlib> 14 #include <cassert> 15 f1()16void f1() 17 { 18 std::exit(0); 19 } 20 main()21int main() 22 { 23 std::set_unexpected(f1); 24 std::unexpected(); 25 assert(false); 26 } 27