[InstCombine] Preserve NSW flags for `lshr (mul nuw X, C1), C2 -> mul nuw nsw X,...
[llvm-project.git] / clang / test / CodeGenCXX / throw-expression-cleanup.cpp
blob9fd9fe9756be5da59cc80e008681501ae90a7c4e
1 // RUN: %clang_cc1 %s -triple x86_64-none-linux-gnu -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
2 // PR13359
4 struct X {
5 ~X();
6 };
7 struct Error {
8 Error(const X&) noexcept;
9 };
11 void f() {
12 try {
13 throw Error(X());
14 } catch (...) { }
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