[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / exceptions-seh-filter-uwtable.cpp
blobbfbff0c53bf09de0285bc5f568e0fcc366853770
1 // RUN: %clang_cc1 "-triple" "arm64-windows" "-funwind-tables=2" "-fms-compatibility" -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s
2 // NOTE: we're passing "-O1 -disable-llvm-passes" to avoid adding optnone and noinline everywhere.
4 # 0 "" 3
5 #define a(b, c) d() & b
6 #define f(c) a(e(0, 0, #c).b(), )
8 struct e {
9 e(int, int, char *);
10 int b();
13 struct d {
14 void operator&(int);
17 struct h;
19 struct i {
20 h *operator->();
21 h &operator*() { f(); }
24 typedef int g;
26 struct h {
27 void ad();
30 g aq(h j, g k, int, int) {
31 if (k)
32 return;
33 j.ad();
36 // Check for the uwtable attribute on the filter funclet.
37 // CHECK: define internal noundef i32 @"?filt$0@0@at@@"(ptr noundef %exception_pointers, ptr noundef %frame_pointer) #[[MD:[0-9]+]]
38 // CHECK: attributes #[[MD]] = { nounwind uwtable
40 void at() {
41 i ar;
43 __try {
44 ar->ad();
45 } __except (aq(*ar, _exception_code(), 0, 0)) {