From 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 2 May 2011 19:39:53 +0000 Subject: Vendor import of clang trunk r130700: http://llvm.org/svn/llvm-project/cfe/trunk@130700 --- test/CodeGenCXX/member-function-pointers.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/CodeGenCXX/member-function-pointers.cpp') diff --git a/test/CodeGenCXX/member-function-pointers.cpp b/test/CodeGenCXX/member-function-pointers.cpp index 78a571e..011e9cd 100644 --- a/test/CodeGenCXX/member-function-pointers.cpp +++ b/test/CodeGenCXX/member-function-pointers.cpp @@ -209,3 +209,26 @@ namespace test8 { return pmf(); } } + +namespace test9 { + struct A { + void foo(); + }; + struct B : A { + void foo(); + }; + + typedef void (A::*fooptr)(); + + struct S { + fooptr p; + }; + + // CHECK: define void @_ZN5test94testEv( + // CHECK: alloca i32 + // CHECK-NEXT: ret void + void test() { + int x; + static S array[] = { (fooptr) &B::foo }; + } +} -- cgit v1.1