Teach the cursor visitor to walk into typeof types (both kinds). This
is hard to test now; tests will come when we can walk stataements and
expressions properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94099 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index e3772da..070cb18 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -200,6 +200,11 @@
   bool VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL);
   bool VisitFunctionTypeLoc(FunctionTypeLoc TL);
   bool VisitArrayTypeLoc(ArrayTypeLoc TL);
+  // FIXME: Implement for TemplateSpecializationTypeLoc
+  // FIXME: Implement visitors here when the unimplemented TypeLocs get
+  // implemented
+  bool VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL);
+  bool VisitTypeOfTypeLoc(TypeOfTypeLoc TL);
 };
   
 } // end anonymous namespace
@@ -532,6 +537,17 @@
   return false;
 }
 
+bool CursorVisitor::VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL) {
+  return Visit(MakeCXCursor(TL.getUnderlyingExpr(), StmtParent, TU));
+}
+
+bool CursorVisitor::VisitTypeOfTypeLoc(TypeOfTypeLoc TL) {
+  if (TypeSourceInfo *TSInfo = TL.getUnderlyingTInfo())
+    return Visit(TSInfo->getTypeLoc());
+
+  return false;
+}
+
 CXString CIndexer::createCXString(const char *String, bool DupString){
   CXString Str;
   if (DupString) {