If we're generating code to create a pointer-to-member function
aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102942 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/member-function-pointers.cpp b/test/CodeGenCXX/member-function-pointers.cpp
index a1f4dae..e4beee1 100644
--- a/test/CodeGenCXX/member-function-pointers.cpp
+++ b/test/CodeGenCXX/member-function-pointers.cpp
@@ -184,3 +184,9 @@
     void (A::*pf)(bool) = &A::f;
   }
 }
+
+// PR7027 
+namespace PR7027 {
+  struct X { void test( ); };
+  void testX() { &X::test; }
+}