Lines Matching refs:Visit
176 /// \brief Visit the given cursor and, if requested by the visitor,
179 /// \param Cursor the cursor to visit.
186 bool CursorVisitor::Visit(CXCursor Cursor, bool CheckedRegionOfInterest) {
365 if (Visit(MakeCXCursor(D, TU, Range), /*CheckedRegionOfInterest=*/true))
385 if (Visit(MakeCXCursor(D, TU, Range), /*CheckedRegionOfInterest=*/true))
456 if (Visit(MakeMacroExpansionCursor(ME, TU)))
463 if (Visit(MakeMacroDefinitionCursor(MD, TU)))
470 if (Visit(MakeInclusionDirectiveCursor(ID, TU)))
480 /// \brief Visit the children of the given cursor.
500 return VisitAttributes(D) || Visit(D);
505 return Visit(S);
512 return Visit(E);
529 if (Visit(MakeCXCursor(*TL, TU, RegionOfInterest), true))
549 return Visit(BaseTSInfo->getTypeLoc());
558 return Visit(cxcursor::MakeCursorObjCClassRef(
574 return Visit(cxcursor::MakeMacroExpansionCursor(MacroDef, BeginLoc, TU));
577 // Nothing to visit at the moment.
583 if (Visit(TSInfo->getTypeLoc()))
587 return Visit(MakeCXCursor(Body, StmtParent, TU, RegionOfInterest));
608 // This declaration overlaps the region of interest; visit it.
657 if (Visit(Cursor, true))
664 llvm_unreachable("Translation units are visited directly by Visit()");
671 return Visit(MakeCXCursor(D->getTemplatedDecl(), TU, RegionOfInterest));
676 return Visit(TSInfo->getTypeLoc());
683 return Visit(TSInfo->getTypeLoc());
698 // Nothing to visit
710 // Visit the template arguments used in the specialization.
729 // FIXME: Visit the "outer" template parameter lists on the TagDecl
734 // Visit the partial specialization arguments.
745 // Visit the default argument.
748 if (Visit(DefArg->getTypeLoc()))
756 return Visit(MakeCXCursor(Init, StmtParent, TU, RegionOfInterest));
769 if (Visit(TSInfo->getTypeLoc()))
772 // Visit the nested-name-specifier, if present.
795 // Visit the function declaration's syntactic components in the order
801 // visit just the return type. Otherwise, just visit the function's type
803 if ((FTL && !isa<CXXConversionDecl>(ND) && Visit(FTL.getReturnLoc())) ||
804 (!FTL && Visit(TL)))
807 // Visit the nested-name-specifier, if present.
812 // Visit the declaration name.
817 // FIXME: Visit explicitly-specified template arguments!
819 // Visit the function parameters, if we have a function type.
841 // Visit the initializers in source order
845 if (Visit(MakeCursorMemberRef(Init->getAnyMember(),
849 if (Visit(TInfo->getTypeLoc()))
853 // Visit the initializer value.
855 if (Visit(MakeCXCursor(Initializer, ND, TU, RegionOfInterest)))
860 if (Visit(MakeCXCursor(ND->getBody(), StmtParent, TU, RegionOfInterest)))
872 return Visit(MakeCXCursor(BitWidth, StmtParent, TU, RegionOfInterest));
882 return Visit(MakeCXCursor(Init, StmtParent, TU, RegionOfInterest));
893 return Visit(MakeCXCursor(DefArg, StmtParent, TU, RegionOfInterest));
899 // FIXME: Visit the "outer" template parameter lists on the FunctionDecl
908 // FIXME: Visit the "outer" template parameter lists on the TagDecl
928 // Visit the bound, if it's explicit.
931 if (Visit(TInfo->getTypeLoc()))
941 if (Visit(TSInfo->getTypeLoc()))
945 if (Visit(MakeCXCursor(P, TU, RegionOfInterest)))
950 Visit(MakeCXCursor(ND->getBody(), StmtParent, TU, RegionOfInterest)))
1007 // additional ones we've collected. Then visit them.
1024 // Now visit the decls.
1033 if (Visit(Cursor, true))
1040 if (Visit(MakeCursorObjCClassRef(ND->getClassInterface(), ND->getLocation(),
1050 if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU)))
1058 return Visit(MakeCursorObjCProtocolRef(PID, PID->getLocation(), TU));
1063 if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU)))
1070 if (PD->getTypeSourceInfo() && Visit(PD->getTypeSourceInfo()->getTypeLoc()))
1091 // Visit synthesized methods since they will be skipped when visiting
1095 if (Visit(MakeCXCursor(MD, TU, RegionOfInterest)))
1100 if (Visit(MakeCXCursor(MD, TU, RegionOfInterest)))
1111 // Visit the type parameter.
1112 if (Visit(MakeCXCursor(typeParam, TU, RegionOfInterest)))
1122 return Visit(MakeCursorObjCClassRef(D, D->getLocation(), TU));
1131 Visit(MakeCursorObjCSuperClassRef(D->getSuperClass(),
1137 if (Visit(SuperClassTInfo->getTypeLoc()))
1143 if (Visit(MakeCursorObjCProtocolRef(*I, *PL, TU)))
1156 if (Visit(MakeCursorObjCClassRef(ID, D->getLocation(), TU)))
1167 Visit(MakeCursorObjCSuperClassRef(D->getSuperClass(),
1179 return Visit(MakeCursorMemberRef(Ivar, PD->getPropertyIvarDeclLoc(), TU));
1189 // Visit nested-name-specifier.
1194 return Visit(MakeCursorNamespaceRef(D->getAliasedNamespace(),
1199 // Visit nested-name-specifier.
1205 if (Visit(MakeCursorOverloadedDeclRef(D, D->getLocation(), TU)))
1212 // Visit nested-name-specifier.
1217 return Visit(MakeCursorNamespaceRef(D->getNominatedNamespaceAsWritten(),
1222 // Visit nested-name-specifier.
1233 // Visit nested-name-specifier.
1253 return Visit(TSInfo->getTypeLoc());
1270 // a beginning source location, we can visit the first component of the
1281 return Visit(MakeCursorNamespaceRef(NNS->getAsNamespace(), Range.getBegin(),
1285 return Visit(MakeCursorNamespaceRef(NNS->getAsNamespaceAlias(),
1290 // range matches up with a reference cursor. Visit the appropriate reference
1294 return Visit(MakeCursorTypeRef(Typedef->getDecl(), Range.getBegin(), TU));
1296 return Visit(MakeCursorTypeRef(Tag->getDecl(), Range.getBegin(), TU));
1324 if (Visit(MakeCursorNamespaceRef(NNS->getAsNamespace(),
1332 if (Visit(MakeCursorNamespaceRef(NNS->getAsNamespaceAlias(),
1341 if (Visit(Q.getTypeLoc()))
1364 if (Visit(MakeCXCursor(*P, TU, RegionOfInterest)))
1374 return Visit(MakeCursorTemplateRef(Name.getAsTemplateDecl(), Loc, TU));
1377 // Visit the overloaded template set.
1378 if (Visit(MakeCursorOverloadedDeclRef(Name, Loc, TU)))
1384 // FIXME: Visit nested-name-specifier.
1388 // FIXME: Visit nested-name-specifier.
1389 return Visit(MakeCursorTemplateRef(
1394 return Visit(MakeCursorTemplateRef(
1399 return Visit(MakeCursorTemplateRef(
1416 return Visit(TSInfo->getTypeLoc());
1421 return Visit(MakeCXCursor(E, StmtParent, TU, RegionOfInterest));
1426 return Visit(MakeCXCursor(E, StmtParent, TU, RegionOfInterest));
1431 return Visit(MakeCXCursor(E, StmtParent, TU, RegionOfInterest));
1451 return Visit(TL.getUnqualifiedLoc());
1506 return Visit(MakeCursorTypeRef(Typedef->getDecl(), TL.getBuiltinLoc(),
1514 return Visit(MakeCursorTypeRef(TL.getTypedefNameDecl(), TL.getNameLoc(), TU));
1518 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1523 return Visit(MakeCXCursor(TL.getDecl(), TU, RegionOfInterest));
1525 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1529 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1533 return Visit(MakeCursorObjCClassRef(TL.getIFaceDecl(), TL.getNameLoc(), TU));
1537 if (TL.hasBaseTypeAsWritten() && Visit(TL.getBaseLoc()))
1541 if (Visit(TL.getTypeArgTInfo(I)->getTypeLoc()))
1546 if (Visit(MakeCursorObjCProtocolRef(TL.getProtocol(I), TL.getProtocolLoc(I),
1555 return Visit(TL.getPointeeLoc());
1559 return Visit(TL.getInnerLoc());
1563 return Visit(TL.getPointeeLoc());
1567 return Visit(TL.getPointeeLoc());
1571 return Visit(TL.getPointeeLoc());
1575 return Visit(TL.getPointeeLoc());
1579 return Visit(TL.getPointeeLoc());
1583 return Visit(TL.getModifiedLoc());
1588 if (!SkipResultType && Visit(TL.getReturnLoc()))
1593 if (Visit(MakeCXCursor(D, TU, RegionOfInterest)))
1600 if (Visit(TL.getElementLoc()))
1604 return Visit(MakeCXCursor(Size, StmtParent, TU, RegionOfInterest));
1610 return Visit(TL.getOriginalLoc());
1614 return Visit(TL.getOriginalLoc());
1619 // Visit the template name.
1624 // Visit the template arguments.
1633 return Visit(MakeCXCursor(TL.getUnderlyingExpr(), StmtParent, TU));
1638 return Visit(TSInfo->getTypeLoc());
1645 return Visit(TSInfo->getTypeLoc());
1656 // Visit the nested-name-specifier, if there is one.
1661 // Visit the template arguments.
1673 return Visit(TL.getNamedTypeLoc());
1677 return Visit(TL.getPatternLoc());
1682 return Visit(MakeCXCursor(E, StmtParent, TU));
1688 return Visit(MakeCursorTypeRef(TL.getDecl(), TL.getNameLoc(), TU));
1692 return Visit(TL.getValueLoc());
1696 bool CursorVisitor::Visit##CLASS##TypeLoc(CLASS##TypeLoc TL) { \
1697 return Visit##PARENT##Loc(TL); \
1717 // Visit the nested-name-specifier, if present.
1724 if (Visit(cxcursor::MakeCursorCXXBaseSpecifier(&I, TU)))
1734 if (Visit(MakeCXCursor(I, D, TU)))
2016 void Visit##Class(const Class *C);
2218 Visitor.Visit(S);
2276 // Visit the name of the type being destroyed.
2278 // Visit the scope type that looks disturbingly like the nested-name-specifier
2281 // Visit the nested-name-specifier.
2284 // Visit base expression.
2399 // visit it.
2426 // Visit the components of the offsetof expression.
2442 // Visit the type into which we're computing the offset.
2497 // visit that. This is useful for (e.g.) pseudo-object expressions.
2499 return Visit(SourceExpr);
2507 Visit(E->getSyntacticForm());
2646 EnqueueVisitor(WL, MakeCXCursor(S, StmtParent, TU,RegionOfInterest)).Visit(S);
2673 if (Visit(MakeCXCursor(D, TU, RegionOfInterest,
2692 if (Visit(cast<TypeLocVisit>(&LI)->get()))
2699 if (Visit(MakeCursorLabelRef(stmt, cast<LabelRefVisit>(&LI)->getLoc(),
2722 if (Visit(MakeCursorMemberRef(V->get(), V->getLoc(), TU)))
2750 // Visit the nested-name-specifier
2755 // Visit the declaration name.
2759 // Visit the explicitly-specified template arguments, if any.
2772 // Visit nested-name-specifier, if present.
2776 // Visit declaration name.
2783 // Visit the nested-name-specifier.
2787 // Visit the declaration name.
2790 // Visit the overloaded declaration reference.
2791 if (Visit(MakeCursorOverloadedDeclRef(O, TU)))
2799 if (Visit(MakeCursorTypeRef(cast<TemplateTypeParmDecl>(Pack),
2807 if (Visit(MakeCursorTemplateRef(cast<TemplateTemplateParmDecl>(Pack),
2820 // Visit captures.
2829 if (Visit(MakeCursorVariableRef(C->getCapturedVar(),
2835 // Visit parameters and return type, if present.
2839 // Visit the whole type.
2840 if (Visit(TL))
2845 // Visit parameters.
2847 if (Visit(MakeCXCursor(Proto.getParam(I), TU)))
2850 // Visit result type.
2851 if (Visit(Proto.getReturnLoc()))
2868 bool CursorVisitor::Visit(const Stmt *S) {
5847 enum CXChildVisitResult Visit(CXCursor cursor, CXCursor parent);
5941 AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) {
6134 return static_cast<AnnotateTokensWorker*>(client_data)->Visit(cursor, parent);
6159 CXChildVisitResult visit(CXCursor cursor, CXCursor parent) {
6216 return static_cast<MarkMacroArgTokensVisitor*>(client_data)->visit(cursor,