CursorVisitor: migrate handling of UnaryTypeTraitExpr
to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119443 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 3b17414..7f4bf66 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -343,7 +343,6 @@
   bool VisitCXXUuidofExpr(CXXUuidofExpr *E);
   bool VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E);
   bool VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E);
-  bool VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E);
   bool VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E);
   bool VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E);
 
@@ -1554,10 +1553,6 @@
   return false;
 }
 
-bool CursorVisitor::VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E) {
-  return Visit(E->getQueriedTypeSourceInfo()->getTypeLoc());
-}
-
 bool CursorVisitor::VisitDependentScopeDeclRefExpr(
                                                 DependentScopeDeclRefExpr *E) {
   // Visit the nested-name-specifier.
@@ -1716,6 +1711,7 @@
   void VisitSwitchStmt(SwitchStmt *S);
   void VisitTypesCompatibleExpr(TypesCompatibleExpr *E);
   void VisitWhileStmt(WhileStmt *W);
+  void VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E);
   void VisitUnresolvedMemberExpr(UnresolvedMemberExpr *U);
   void VisitVAArgExpr(VAArgExpr *E);
 
@@ -1888,6 +1884,9 @@
   AddStmt(W->getCond());
   AddDecl(W->getConditionVariable());
 }
+void EnqueueVisitor::VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E) {
+  AddTypeLoc(E->getQueriedTypeSourceInfo());
+}
 void EnqueueVisitor::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *U) {
   VisitOverloadExpr(U);
   if (!U->isImplicitAccess())