[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-abi-eh-terminate.cpp
blob07716fed92ea97fa1080e37448c88e72cb74e51b
1 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=18.00 | FileCheck -check-prefix=MSVC2013 -check-prefix=CHECK %s
2 // RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=19.00 | FileCheck -check-prefix=MSVC2015 -check-prefix=CHECK %s
4 void may_throw();
5 void never_throws() noexcept(true) {
6 may_throw();
9 // CHECK-LABEL: define dso_local void @"?never_throws@@YAXXZ"()
10 // CHECK-SAME: personality ptr @__CxxFrameHandler3
11 // CHECK: invoke void @"?may_throw@@YAXXZ"()
12 // CHECK: %[[cp:.*]] = cleanuppad within none []
13 // MSVC2013: call void @"?terminate@@YAXXZ"()
14 // MSVC2015: call void @__std_terminate()
15 // CHECK-SAME: [ "funclet"(token %[[cp]]) ]
16 // CHECK-NEXT: unreachable