From cdd313d46ceeabc86ac1373714ab07fec65fc379 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 9 Dec 2014 01:36:45 +0000 Subject: [PATCH] MS ABI: Add another test for PR20017 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223733 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/microsoft-abi-member-pointers.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/CodeGenCXX/microsoft-abi-member-pointers.cpp b/test/CodeGenCXX/microsoft-abi-member-pointers.cpp index f403aff294..719cb70679 100644 --- a/test/CodeGenCXX/microsoft-abi-member-pointers.cpp +++ b/test/CodeGenCXX/microsoft-abi-member-pointers.cpp @@ -15,6 +15,16 @@ int B::*&b = b; // CHECK: @"\01?b@PR20947@@3AAPQB@1@HA" = global %[[opaque1]]* null, align 4 } +namespace PR20017 { +template +struct A { + int T::*m_fn1() { return nullptr; } +}; +struct B; +auto a = &A::m_fn1; +// CHECK-DAG: @"\01?a@PR20017@@3P8?$A@UB@PR20017@@@1@AEPQB@1@HXZQ21@" = global i8* bitcast ({ i32, i32, i32 } ({{.*}}*)* @"\01?m_fn1@?$A@UB@PR20017@@@PR20017@@QAEPQB@2@HXZ" to i8*), align 4 +} + #ifndef INCOMPLETE_VIRTUAL struct B1 { void foo(); -- 2.40.0