diff --git a/lib/Frontend/PCHReaderStmt.cpp b/lib/Frontend/PCHReaderStmt.cpp
index 2c954a6..60318de 100644
--- a/lib/Frontend/PCHReaderStmt.cpp
+++ b/lib/Frontend/PCHReaderStmt.cpp
@@ -725,7 +725,7 @@
 
 unsigned PCHStmtReader::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
   VisitExpr(E);
-  E->setEncodedType(Reader.GetType(Record[Idx++]));
+  E->setEncodedTypeSourceInfo(Reader.GetTypeSourceInfo(Record, Idx));
   E->setAtLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   E->setRParenLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
   return 0;
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index 9a5417c..9c9f891 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -655,7 +655,7 @@
 
 void PCHStmtWriter::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
   VisitExpr(E);
-  Writer.AddTypeRef(E->getEncodedType(), Record);
+  Writer.AddTypeSourceInfo(E->getEncodedTypeSourceInfo(), Record);
   Writer.AddSourceLocation(E->getAtLoc(), Record);
   Writer.AddSourceLocation(E->getRParenLoc(), Record);
   Code = pch::EXPR_OBJC_ENCODE;
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 0535923..2578332 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -2411,7 +2411,7 @@
                                             unsigned NumStrings);
 
   Expr *BuildObjCEncodeExpression(SourceLocation AtLoc,
-                                  QualType EncodedType,
+                                  TypeSourceInfo *EncodedTypeInfo,
                                   SourceLocation RParenLoc);
   CXXMemberCallExpr *BuildCXXMemberCallExpr(Expr *Exp,
                                             NamedDecl *FoundDecl,
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp
index ad95f00..ce06abe 100644
--- a/lib/Sema/SemaExprObjC.cpp
+++ b/lib/Sema/SemaExprObjC.cpp
@@ -95,8 +95,9 @@
 }
 
 Expr *Sema::BuildObjCEncodeExpression(SourceLocation AtLoc,
-                                      QualType EncodedType,
+                                      TypeSourceInfo *EncodedTypeInfo,
                                       SourceLocation RParenLoc) {
+  QualType EncodedType = EncodedTypeInfo->getType();
   QualType StrTy;
   if (EncodedType->isDependentType())
     StrTy = Context.DependentTy;
@@ -114,7 +115,7 @@
                                          ArrayType::Normal, 0);
   }
 
-  return new (Context) ObjCEncodeExpr(StrTy, EncodedType, AtLoc, RParenLoc);
+  return new (Context) ObjCEncodeExpr(StrTy, EncodedTypeInfo, AtLoc, RParenLoc);
 }
 
 Sema::ExprResult Sema::ParseObjCEncodeExpression(SourceLocation AtLoc,
@@ -123,9 +124,13 @@
                                                  TypeTy *ty,
                                                  SourceLocation RParenLoc) {
   // FIXME: Preserve type source info ?
-  QualType EncodedType = GetTypeFromParser(ty);
+  TypeSourceInfo *TInfo;
+  QualType EncodedType = GetTypeFromParser(ty, &TInfo);
+  if (!TInfo)
+    TInfo = Context.getTrivialTypeSourceInfo(EncodedType,
+                                             PP.getLocForEndOfToken(LParenLoc));
 
-  return BuildObjCEncodeExpression(AtLoc, EncodedType, RParenLoc);
+  return BuildObjCEncodeExpression(AtLoc, TInfo, RParenLoc);
 }
 
 Sema::ExprResult Sema::ParseObjCSelectorExpression(Selector Sel,
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index e2fdf66..ba714e8 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -1688,9 +1688,9 @@
   /// By default, performs semantic analysis to build the new expression.
   /// Subclasses may override this routine to provide different behavior.
   OwningExprResult RebuildObjCEncodeExpr(SourceLocation AtLoc,
-                                         QualType T,
+                                         TypeSourceInfo *EncodeTypeInfo,
                                          SourceLocation RParenLoc) {
-    return SemaRef.Owned(SemaRef.BuildObjCEncodeExpression(AtLoc, T,
+    return SemaRef.Owned(SemaRef.BuildObjCEncodeExpression(AtLoc, EncodeTypeInfo,
                                                            RParenLoc));
   }
 
@@ -5464,18 +5464,17 @@
 template<typename Derived>
 Sema::OwningExprResult
 TreeTransform<Derived>::TransformObjCEncodeExpr(ObjCEncodeExpr *E) {
-  // FIXME: poor source location
-  TemporaryBase Rebase(*this, E->getAtLoc(), DeclarationName());
-  QualType EncodedType = getDerived().TransformType(E->getEncodedType());
-  if (EncodedType.isNull())
+  TypeSourceInfo *EncodedTypeInfo
+    = getDerived().TransformType(E->getEncodedTypeSourceInfo());
+  if (!EncodedTypeInfo)
     return SemaRef.ExprError();
 
   if (!getDerived().AlwaysRebuild() &&
-      EncodedType == E->getEncodedType())
+      EncodedTypeInfo == E->getEncodedTypeSourceInfo())
     return SemaRef.Owned(E->Retain());
 
   return getDerived().RebuildObjCEncodeExpr(E->getAtLoc(),
-                                            EncodedType,
+                                            EncodedTypeInfo,
                                             E->getRParenLoc());
 }
 
