Lines Matching refs:Matcher
13 // calling the Matches(...) method of each matcher we are running on each
14 // AST node. The matcher can recurse via the ASTMatchFinder interface.
38 // of performance vs. memory consumption by running matcher
53 // We use memoization to avoid running the same matcher on the same
56 // identifying the matcher), a pointer to the AST node and the
57 // bound nodes before the matcher was executed.
92 // Creates an AST visitor that matches 'matcher' on all children or
96 MatchChildASTVisitor(const DynTypedMatcher *Matcher, ASTMatchFinder *Finder,
100 : Matcher(Matcher), Finder(Finder), Builder(Builder), CurrentDepth(0),
349 // Sets 'Matched' to true if 'Matcher' matches 'Node' and:
361 if (Matcher->matches(DynTypedNode::create(Node), Finder,
369 if (Matcher->matches(DynTypedNode::create(Node), Finder,
371 // After the first match the matcher succeeds.
390 const DynTypedMatcher *const Matcher;
579 const DynTypedMatcher &Matcher,
584 return matchesRecursively(Node, Matcher, Builder, MaxDepth, Bind);
587 Key.MatcherID = Matcher.getID();
603 matchesRecursively(Node, Matcher, &Result.Nodes, MaxDepth, Bind);
614 const DynTypedMatcher &Matcher,
628 MatchChildASTVisitor Visitor(&Matcher, this, Builder, MaxDepth,
634 const Matcher<NamedDecl> &Base,
639 const Matcher<NamedDecl> &Base,
645 const DynTypedMatcher &Matcher,
649 return memoizedMatchesRecursively(Node, Ctx, Matcher, Builder, 1, Bind);
653 const DynTypedMatcher &Matcher,
658 return memoizedMatchesRecursively(Node, Ctx, Matcher, Builder, INT_MAX,
663 const DynTypedMatcher &Matcher,
671 return matchesParentOf(Node, Matcher, Builder);
672 return matchesAnyAncestorOf(Node, Ctx, Matcher, Builder);
900 // Returns whether a direct parent of \p Node matches \p Matcher.
902 bool matchesParentOf(const DynTypedNode &Node, const DynTypedMatcher &Matcher,
906 if (Matcher.matches(Parent, this, &BuilderCopy)) {
914 // Returns whether an ancestor of \p Node matches \p Matcher.
931 const DynTypedMatcher &Matcher,
954 Keys.back().MatcherID = Matcher.getID();
978 if (Matcher.matches(Node, this, &BuilderCopy)) {
1012 if (Matcher.matches(Queue.front(), this, &BuilderCopy)) {
1048 // Returns true if 'TypeNode' has an alias that matches the given matcher.
1050 const Matcher<NamedDecl> &Matcher,
1059 if (Matcher.matches(*Alias, this, &Result)) {
1069 const Matcher<NamedDecl> &Matcher,
1076 if (Matcher.matches(*Alias, this, &Result)) {
1086 /// Used to get the appropriate bucket for each matcher.
1091 /// Filtered list of matcher indices for each matcher kind.
1094 /// kind (and derived kinds) so it is a waste to try every matcher on every
1110 // Maps (matcher, node) -> the match result for memoization.
1140 const Matcher<NamedDecl> &Base,
1152 // unfortunately we accept a Decl matcher for the base class not a Type
1153 // matcher, so it's the best thing we can do with our current interface.
1176 const ObjCInterfaceDecl *Declaration, const Matcher<NamedDecl> &Base,