49 lines · cpp
1// RUN: %clang_cc1 "-triple" "arm64-windows" "-funwind-tables=2" "-fms-compatibility" -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s2// NOTE: we're passing "-O1 -disable-llvm-passes" to avoid adding optnone and noinline everywhere.3 4# 0 "" 35#define a(b, c) d() & b6#define f(c) a(e(0, 0, #c).b(), )7 8struct e {9 e(int, int, char *);10 int b();11};12 13struct d {14 void operator&(int);15};16 17struct h;18 19struct i {20 h *operator->();21 h &operator*() { f(); }22};23 24typedef int g;25 26struct h {27 void ad();28};29 30g 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 noundef i32 @"?filt$0@0@at@@"(ptr noundef %exception_pointers, ptr noundef %frame_pointer) #[[MD:[0-9]+]]38// CHECK: attributes #[[MD]] = { nounwind uwtable39 40void at() {41 i ar;42 43 __try {44 ar->ad();45 } __except (aq(*ar, _exception_code(), 0, 0)) {46 }47 48}49