Handle member expressions that return references correctly.

llvm-svn: 80723
diff --git a/clang/test/CodeGenCXX/references.cpp b/clang/test/CodeGenCXX/references.cpp
index 8e19356..6f4c103 100644
--- a/clang/test/CodeGenCXX/references.cpp
+++ b/clang/test/CodeGenCXX/references.cpp
@@ -87,3 +87,11 @@
   const int& b = 1;
   return a+b;
 }
+
+struct A {
+  int& b();
+};
+
+void f(A* a) {
+  int b = a->b();
+}