1 // RUN: %clang_cc1 "-triple" "arm64-windows" "-munwind-tables" "-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.
3 
4 # 0 "" 3
5 #define a(b, c) d() & b
6 #define f(c) a(e(0, 0, #c).b(), )
7 
8 struct e {
9   e(int, int, char *);
10   int b();
11 };
12 
13 struct d {
14   void operator&(int);
15 };
16 
17 struct h;
18 
19 struct i {
20   h *operator->();
operator *i21   h &operator*() { f(); }
22 };
23 
24 typedef int g;
25 
26 struct h {
27   void ad();
28 };
29 
aq(h j,g k,int,int)30 g aq(h j, g k, int, int) {
31   if (k)
32     return;
33   j.ad();
34 }
35 
36 // Check for the uwtable attribute on the filter funclet.
37 // CHECK: define internal i32 @"?filt$0@0@at@@"(i8* %exception_pointers, i8* %frame_pointer) #[[MD:[0-9]+]]
38 // CHECK: attributes #[[MD]] = { nounwind uwtable
39 
at()40 void at() {
41   i ar;
42 
43   __try {
44     ar->ad();
45   } __except (aq(*ar, _exception_code(), 0, 0)) {
46   }
47 
48 }
49