[llvm-branch-commits] [cfe-branch] r119653 - /cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 17 18:37:41 PST 2010
Author: ddunbar
Date: Wed Nov 17 20:37:41 2010
New Revision: 119653
URL: http://llvm.org/viewvc/llvm-project?rev=119653&view=rev
Log:
Merge r119437:
--
Author: Ted Kremenek <kremenek at apple.com>
Date: Wed Nov 17 00:50:36 2010 +0000
CursorVisitor: Migrate CXXUnresolvedConstructExpr over to data-recursive algorithm.
Modified:
cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
Modified: cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp?rev=119653&r1=119652&r2=119653&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp Wed Nov 17 20:37:41 2010
@@ -348,7 +348,6 @@
bool VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E);
bool VisitUnaryTypeTraitExpr(UnaryTypeTraitExpr *E);
bool VisitDependentScopeDeclRefExpr(DependentScopeDeclRefExpr *E);
- bool VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E);
bool VisitCXXDependentScopeMemberExpr(CXXDependentScopeMemberExpr *E);
// Data-recursive visitor functions.
@@ -1614,15 +1613,6 @@
return false;
}
-bool CursorVisitor::VisitCXXUnresolvedConstructExpr(
- CXXUnresolvedConstructExpr *E) {
- if (TypeSourceInfo *TSInfo = E->getTypeSourceInfo())
- if (Visit(TSInfo->getTypeLoc()))
- return true;
-
- return VisitExpr(E);
-}
-
bool CursorVisitor::VisitCXXDependentScopeMemberExpr(
CXXDependentScopeMemberExpr *E) {
// Visit the base expression, if there is one.
@@ -1723,6 +1713,7 @@
void VisitCXXNewExpr(CXXNewExpr *E);
void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E);
void VisitCXXTemporaryObjectExpr(CXXTemporaryObjectExpr *E);
+ void VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr *E);
void VisitDeclRefExpr(DeclRefExpr *D);
void VisitDeclStmt(DeclStmt *S);
void VisitExplicitCastExpr(ExplicitCastExpr *E);
@@ -1806,6 +1797,12 @@
EnqueueChildren(E);
AddTypeLoc(E->getTypeSourceInfo());
}
+
+void EnqueueVisitor::VisitCXXUnresolvedConstructExpr(CXXUnresolvedConstructExpr
+ *E) {
+ EnqueueChildren(E);
+ AddTypeLoc(E->getTypeSourceInfo());
+}
void EnqueueVisitor::VisitDeclRefExpr(DeclRefExpr *DR) {
WL.push_back(DeclRefExprParts(DR, Parent));
}
More information about the llvm-branch-commits
mailing list