minix/external/bsd/llvm/dist/clang/test/CodeGenCXX/throw-expression-cleanup.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

22 lines
464 B
C++

// RUN: %clang_cc1 %s -triple x86_64-none-linux-gnu -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
// PR13359
struct X {
~X();
};
struct Error {
Error(const X&) noexcept;
};
void f() {
try {
throw Error(X());
} catch (...) { }
}
// CHECK-LABEL: define void @_Z1fv
// CHECK: call void @_ZN5ErrorC1ERK1X
// CHECK: invoke void @__cxa_throw
// CHECK: landingpad
// CHECK: call void @_ZN1XD1Ev
// CHECK-NOT: __cxa_free_exception