aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/pr28360.cpp
blob: 889cebb315277b37b2c39fdc80951da596bf48ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 %s -emit-llvm -o - -triple i686-pc-win32 | FileCheck %s
struct A {
  void Foo();
  void Foo(int);
};

using MpTy = void (A::*)();

void Bar(const MpTy &);

void Baz() { Bar(&A::Foo); }

// CHECK-LABEL: define dso_local void @"?Baz@@YAXXZ"(
// CHECK:  %[[ref_tmp:.*]] = alloca ptr, align 4
// CHECK: store ptr @"?Foo@A@@QAEXXZ", ptr %[[ref_tmp]], align 4
// CHECK: call void @"?Bar@@YAXABQ8A@@AEXXZ@Z"(ptr noundef nonnull align 4 dereferenceable(4) %[[ref_tmp]])