[llvm-branch-commits] [cfe-branch] r119654 - /cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp
Daniel Dunbar
daniel at zuster.org
Wed Nov 17 18:37:44 PST 2010
Author: ddunbar
Date: Wed Nov 17 20:37:44 2010
New Revision: 119654
URL: http://llvm.org/viewvc/llvm-project?rev=119654&view=rev
Log:
Merge r119438:
--
Author: Ted Kremenek <kremenek at apple.com>
Date: Wed Nov 17 00:50:39 2010 +0000
CursorVisitor: migrate handling of
TypesCompatibleExpr to data-recursion 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=119654&r1=119653&r2=119654&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/Apple/whitney/tools/libclang/CIndex.cpp Wed Nov 17 20:37:44 2010
@@ -339,7 +339,6 @@
bool VisitOffsetOfExpr(OffsetOfExpr *E);
bool VisitSizeOfAlignOfExpr(SizeOfAlignOfExpr *E);
bool VisitAddrLabelExpr(AddrLabelExpr *E);
- bool VisitTypesCompatibleExpr(TypesCompatibleExpr *E);
bool VisitVAArgExpr(VAArgExpr *E);
bool VisitDesignatedInitExpr(DesignatedInitExpr *E);
bool VisitCXXTypeidExpr(CXXTypeidExpr *E);
@@ -1488,11 +1487,6 @@
return Visit(MakeCursorLabelRef(E->getLabel(), E->getLabelLoc(), TU));
}
-bool CursorVisitor::VisitTypesCompatibleExpr(TypesCompatibleExpr *E) {
- return Visit(E->getArgTInfo1()->getTypeLoc()) ||
- Visit(E->getArgTInfo2()->getTypeLoc());
-}
-
bool CursorVisitor::VisitVAArgExpr(VAArgExpr *E) {
if (Visit(E->getWrittenTypeInfo()->getTypeLoc()))
return true;
@@ -1726,6 +1720,7 @@
void VisitOverloadExpr(OverloadExpr *E);
void VisitStmt(Stmt *S);
void VisitSwitchStmt(SwitchStmt *S);
+ void VisitTypesCompatibleExpr(TypesCompatibleExpr *E);
void VisitWhileStmt(WhileStmt *W);
void VisitUnresolvedMemberExpr(UnresolvedMemberExpr *U);
@@ -1866,6 +1861,11 @@
AddStmt(S->getCond());
AddDecl(S->getConditionVariable());
}
+void EnqueueVisitor::VisitTypesCompatibleExpr(TypesCompatibleExpr *E) {
+ AddTypeLoc(E->getArgTInfo2());
+ AddTypeLoc(E->getArgTInfo1());
+}
+
void EnqueueVisitor::VisitWhileStmt(WhileStmt *W) {
AddStmt(W->getBody());
AddStmt(W->getCond());
More information about the llvm-branch-commits
mailing list