[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / windows-seh-filter-inFinally.c
blob2e6fc501512db9ccf71c90bd13753d23db7cc3bd
1 // RUN: %clang_cc1 -triple x86_64-windows -fms-extensions -Wno-implicit-function-declaration -S -emit-llvm %s -o - | FileCheck %s
3 // CHECK: %[[dst:[0-9-]+]] = call ptr @llvm.eh.recoverfp(ptr @"?fin$0@0@main@@", ptr %frame_pointer)
4 // CHECK-NEXT: %[[dst1:[0-9-]+]] = call ptr @llvm.localrecover(ptr @"?fin$0@0@main@@", ptr %[[dst]], i32 0)
5 // CHECK-NEXT: = load ptr, ptr %[[dst1]], align 8
7 int
8 main(int argc, char *argv[])
10 int Counter = 0;
12 // Try/except within the finally clause of a try/finally.
14 __try {
15 Counter -= 1;
17 __finally {
18 __try {
19 Counter += 2;
20 // RtlRaiseStatus(STATUS_INTEGER_OVERFLOW);
21 } __except(Counter) {
22 __try {
23 Counter += 3;
25 __finally {
26 if (abnormal_termination() == 1) {
27 Counter += 5;
32 // expect Counter == 9
33 return 1;