Home | History | Annotate | Download | only in ASTMatchers

Lines Matching defs:Matcher

14 //  calling the Matches(...) method of each matcher we are running on each
15 // AST node. The matcher can recurse via the ASTMatchFinder interface.
39 // of performance vs. memory consumption by running matcher
47 // We use memoization to avoid running the same matcher on the same
50 // identifying the matcher), a pointer to the AST node and the
51 // bound nodes before the matcher was executed.
83 // Creates an AST visitor that matches 'matcher' on all children or
87 MatchChildASTVisitor(const DynTypedMatcher *Matcher,
93 : Matcher(Matcher),
239 // Sets 'Matched' to true if 'Matcher' matches 'Node' and:
251 if (Matcher->matches(ast_type_traits::DynTypedNode::create(Node), Finder,
259 if (Matcher->matches(ast_type_traits::DynTypedNode::create(Node), Finder,
261 // After the first match the matcher succeeds.
280 const DynTypedMatcher *const Matcher;
377 const DynTypedMatcher &Matcher,
382 return matchesRecursively(Node, Matcher, Builder, MaxDepth, Traversal,
386 Key.MatcherID = Matcher.getID();
399 Result.ResultOfMatch = matchesRecursively(Node, Matcher, &Result.Nodes,
411 const DynTypedMatcher &Matcher,
415 &Matcher, this, Builder, MaxDepth, Traversal, Bind);
420 const Matcher<NamedDecl> &Base,
425 const DynTypedMatcher &Matcher,
431 return memoizedMatchesRecursively(Node, Matcher, Builder, 1, Traversal,
436 const DynTypedMatcher &Matcher,
441 return memoizedMatchesRecursively(Node, Matcher, Builder, INT_MAX,
446 const DynTypedMatcher &Matcher,
453 return memoizedMatchesAncestorOfRecursively(Node, Matcher, Builder,
599 // Returns whether an ancestor of \p Node matches \p Matcher.
613 const ast_type_traits::DynTypedNode &Node, const DynTypedMatcher &Matcher,
620 Key.MatcherID = Matcher.getID();
641 if (Matcher.matches(Parent, this, &Result.Nodes)) {
648 Parent, Matcher, &Result.Nodes, MatchMode);
659 if (Matcher.matches(Queue.front(), this, &Result.Nodes)) {
702 // Returns true if 'TypeNode' has an alias that matches the given matcher.
704 const Matcher<NamedDecl> Matcher,
710 if (Matcher.matches(*Alias, this, &Result)) {
720 /// Used to get the appropriate bucket for each matcher.
725 /// \brief Filtered list of matcher indices for each matcher kind.
728 /// kind (and derived kinds) so it is a waste to try every matcher on every
742 // Maps (matcher, node) -> the match result for memoization.
793 const Matcher<NamedDecl> &Base,