Add support for member references (E1.E2, E1->E2) with C++ semantics,
which can refer to static data members, enumerators, and member
functions as well as to non-static data members.

Implement correct lvalue computation for member references in C++. 
Compute the result type of non-static data members of reference type properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/StmtSerialization.cpp b/lib/AST/StmtSerialization.cpp
index 686ee68..d12ecd0 100644
--- a/lib/AST/StmtSerialization.cpp
+++ b/lib/AST/StmtSerialization.cpp
@@ -761,7 +761,7 @@
 
 MemberExpr* MemberExpr::CreateImpl(Deserializer& D, ASTContext& C) {
   SourceLocation L = SourceLocation::ReadVal(D);
-  FieldDecl* MemberDecl = cast<FieldDecl>(D.ReadPtr<Decl>());
+  NamedDecl* MemberDecl = cast<NamedDecl>(D.ReadPtr<Decl>());
   bool IsArrow = D.ReadBool();
   QualType T = QualType::ReadVal(D);
   Expr* base = D.ReadOwnedPtr<Expr>(C);