27 lines · cpp
1// RUN: %clang_cc1 %std_cxx98-14 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-PRE172// RUN: %clang_cc1 %std_cxx17- %s -triple=x86_64-apple-darwin10 -Wno-dynamic-exception-spec -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s --check-prefixes=CHECK,CHECK-173 4void external();5 6// CHECK-LABEL: _Z6targetv(7// CHECK: invoke void @_Z8externalv()8// CHECK: landingpad { ptr, i32 }9// CHECK-NEXT: filter [1 x ptr] [ptr @_ZTIi]10// CHECK: call void @__cxa_call_unexpected11void target() throw(int)12{13 external();14}15 16// CHECK-LABEL: _Z7target2v(17// CHECK: invoke void @_Z8externalv()18// CHECK: landingpad { ptr, i32 }19// CHECK-PRE17-NEXT: filter [0 x ptr] zeroinitializer20// CHECK-17-NEXT: catch ptr null21// CHECK-PRE17: call void @__cxa_call_unexpected22// CHECK-17: call void @__clang_call_terminate23void target2() throw()24{25 external();26}27