CFG: add all LHS of assingments as lvalue. This improves support for C++ reference. Patch by Jordy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105383 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/reference.cpp b/test/Analysis/reference.cpp
index 54d7cf5..6b96215 100644
--- a/test/Analysis/reference.cpp
+++ b/test/Analysis/reference.cpp
@@ -9,3 +9,18 @@
   if (b != 3)
     *p = 1; // no-warning
 }
+
+char* ptr();
+char& ref();
+
+// These next two tests just shouldn't crash.
+char t1 () {
+  ref() = 'c';
+  return '0';
+}
+
+// just a sanity test, the same behavior as t1()
+char t2 () {
+  *ptr() = 'c';
+  return '0';
+}