]> granicus.if.org Git - clang/commitdiff
CursorVisitor: migrate handling of UnaryTypeTraitExpr
authorTed Kremenek <kremenek@apple.com>
Wed, 17 Nov 2010 00:50:50 +0000 (00:50 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 17 Nov 2010 00:50:50 +0000 (00:50 +0000)
to data-recursion algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119443 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndex.cpp

index 3b17414052f51953191db64160c6a83d30261b5b..7f4bf6629d1cdbaa82b2f727dfa3faf6e914c54e 100644 (file)
@@ -343,7 +343,6 @@ public:
   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 @@ bool CursorVisitor::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) {
   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 @@ public:
   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 @@ void EnqueueVisitor::VisitWhileStmt(WhileStmt *W) {
   AddStmt(W->getCond());
   AddDecl(W->getConditionVariable());
 }
+void EnqueueVisitor::VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E) {
+  AddTypeLoc(E->getQueriedTypeSourceInfo());
+}
 void EnqueueVisitor::VisitUnresolvedMemberExpr(UnresolvedMemberExpr *U) {
   VisitOverloadExpr(U);
   if (!U->isImplicitAccess())