p9-noexcept.cpp revision a968e97947b1281c3bb3c4d47a952b3801d9bb02
1// RUN: %clang_cc1 %s -std=c++0x -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s
2
3void external();
4
5void target() noexcept
6{
7  // CHECK: invoke void @_Z8externalv()
8  external();
9}
10// CHECK:  call i32 (i8*, i8*, ...)* @llvm.eh.selector({{.*}} i8* null) nounwind
11// CHECK-NEXT: call void @_ZSt9terminatev() noreturn nounwind
12// CHECK-NEXT: unreachable
13
14void reverse() noexcept(false)
15{
16  // CHECK: call void @_Z8externalv()
17  external();
18}
19