Keep proper source location information for the type in an Objective-C
@encode expression. 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 10c3995..eb93a8f 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -305,6 +305,7 @@
   bool VisitCompoundLiteralExpr(CompoundLiteralExpr *E);
   bool VisitExplicitCastExpr(ExplicitCastExpr *E);
   bool VisitObjCMessageExpr(ObjCMessageExpr *E);
+  bool VisitObjCEncodeExpr(ObjCEncodeExpr *E);
   bool VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E);
 };
 
@@ -977,6 +978,11 @@
   return VisitExpr(E);
 }
 
+bool CursorVisitor::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
+  return Visit(E->getEncodedTypeSourceInfo()->getTypeLoc());
+}
+
+
 bool CursorVisitor::VisitAttributes(Decl *D) {
   for (const Attr *A = D->getAttrs(); A; A = A->getNext())
     if (Visit(MakeCXCursor(A, D, TU)))