Home | History | Annotate | Download | only in ASTMatchers

Lines Matching defs:Matchers

292 // matchers.
296 MatchASTVisitor(const MatchFinder::MatchersByType *Matchers,
298 : Matchers(Matchers), Options(Options), ActiveASTContext(nullptr) {}
309 for (MatchCallback *MC : Matchers->AllCallbacks) {
319 for (MatchCallback *MC : Matchers->AllCallbacks) {
457 // Matches all registered matchers on the given node and calls the
517 /// \brief Runs all the \p Matchers on \p Node.
521 void matchWithoutFilter(const T &Node, const MC &Matchers) {
524 for (const auto &MP : Matchers) {
546 auto &Matchers = this->Matchers->DeclOrStmt;
548 auto &MP = Matchers[I];
562 auto &Matchers = this->Matchers->DeclOrStmt;
563 assert((Matchers.size() < USHRT_MAX) && "Too many matchers.");
564 for (unsigned I = 0, E = Matchers.size(); I != E; ++I) {
565 if (Matchers[I].first.canMatchNodesOfKind(Kind)) {
573 /// \brief Overloads to pair the different node types to their matchers.
582 matchWithoutFilter(QualType(Node, 0), Matchers->Type);
585 matchWithoutFilter(*Node, Matchers->TypeLoc);
588 matchWithoutFilter(*Node, Matchers->Type);
591 matchWithoutFilter(*Node, Matchers->NestedNameSpecifier);
594 matchWithoutFilter(*Node, Matchers->NestedNameSpecifierLoc);
723 const MatchFinder::MatchersByType *Matchers;
727 /// \c Decl and \c Stmt toplevel matchers usually apply to a specific node
730 /// We precalculate a list of matchers that pass the toplevel restrict check.
845 // We still want to find those types via matchers, so we match them here. Note
910 Matchers.DeclOrStmt.emplace_back(NodeMatch, Action);
911 Matchers.AllCallbacks.insert(Action);
916 Matchers.Type.emplace_back(NodeMatch, Action);
917 Matchers.AllCallbacks.insert(Action);
922 Matchers.DeclOrStmt.emplace_back(NodeMatch, Action);
923 Matchers.AllCallbacks.insert(Action);
928 Matchers.NestedNameSpecifier.emplace_back(NodeMatch, Action);
929 Matchers.AllCallbacks.insert(Action);
934 Matchers.NestedNameSpecifierLoc.emplace_back(NodeMatch, Action);
935 Matchers.AllCallbacks.insert(Action);
940 Matchers.TypeLoc.emplace_back(NodeMatch, Action);
941 Matchers.AllCallbacks.insert(Action);
974 internal::MatchASTVisitor Visitor(&Matchers, Options);
980 internal::MatchASTVisitor Visitor(&Matchers, Options);