1*532dc62bSNikita Popov // RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
20b94c9fbSSebastian Redl 
30b94c9fbSSebastian Redl void external();
40b94c9fbSSebastian Redl 
target()50b94c9fbSSebastian Redl void target() noexcept
60b94c9fbSSebastian Redl {
70b94c9fbSSebastian Redl   // CHECK: invoke void @_Z8externalv()
80b94c9fbSSebastian Redl   external();
90b94c9fbSSebastian Redl }
10fcbdb6eaSDavid Majnemer // CHECK:      [[T0:%.*]] = landingpad { i8*, i32 }
11f0724e8eSBill Wendling // CHECK-NEXT:  catch i8* null
12e142ad50SJohn McCall // CHECK-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0
13e1c4a1baSBill Wendling // CHECK-NEXT: call void @__clang_call_terminate(i8* [[T1]]) [[NR_NUW:#[0-9]+]]
140b94c9fbSSebastian Redl // CHECK-NEXT: unreachable
150b94c9fbSSebastian Redl 
reverse()160b94c9fbSSebastian Redl void reverse() noexcept(false)
170b94c9fbSSebastian Redl {
180b94c9fbSSebastian Redl   // CHECK: call void @_Z8externalv()
190b94c9fbSSebastian Redl   external();
200b94c9fbSSebastian Redl }
21e1c4a1baSBill Wendling 
22e1c4a1baSBill Wendling // CHECK: attributes [[NR_NUW]] = { noreturn nounwind }
23