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