summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-11-17 00:50:39 +0000
committerTed Kremenek <kremenek@apple.com>2010-11-17 00:50:39 +0000
commitdd0d4b4192ca6b3ef655310a24162904f01ac8a1 (patch)
tree4ead3aafd8142de229631acc1ce7ac850b30a86a /clang/tools
parent79ddc67caa5615fe62bdac6d9bfa26e224111ebf (diff)
downloadbcm5719-llvm-dd0d4b4192ca6b3ef655310a24162904f01ac8a1.tar.gz
bcm5719-llvm-dd0d4b4192ca6b3ef655310a24162904f01ac8a1.zip
CursorVisitor: migrate handling of
TypesCompatibleExpr to data-recursion algorithm. llvm-svn: 119438
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index a14d1895117..acf6b740f9a 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -339,7 +339,6 @@ public:
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 @@ bool CursorVisitor::VisitAddrLabelExpr(AddrLabelExpr *E) {
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 @@ public:
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 @@ void EnqueueVisitor::VisitSwitchStmt(SwitchStmt *S) {
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());
OpenPOWER on IntegriCloud