1// RUN: %clang_cc1 %s -triple x86_64-none-linux-gnu -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
2// PR13359
3
4struct X {
5  ~X();
6};
7struct Error {
8  Error(const X&) noexcept;
9};
10
11void f() {
12  try {
13    throw Error(X());
14  } catch (...) { }
15}
16
17// CHECK-LABEL: define void @_Z1fv
18// CHECK: call void @_ZN5ErrorC1ERK1X
19// CHECK: invoke void @__cxa_throw
20// CHECK: landingpad
21// CHECK: call void @_ZN1XD1Ev
22// CHECK-NOT: __cxa_free_exception
23