Fix <rdar://problem/6502934>. We were creating an ImplicitCastExpr
with reference type (it should be an lvalue with non-reference type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62345 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index 7c44056..7626e4a 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -1,5 +1,4 @@
 // RUN: clang -fsyntax-only -verify %s
-
 enum E {
   Val1,
   Val2
@@ -12,3 +11,15 @@
   E e = Val1;
   float& fr = enumerator_type(Val2);
 }
+
+// <rdar://problem/6502934>
+typedef enum Foo {
+	A = 0,
+	B = 1
+} Foo;
+	
+	
+void bar() {
+	Foo myvar = A;
+	myvar = B;
+}