Home | History | Annotate | Download | only in ASTMatchers

Lines Matching defs:Nodes

10 //  Implements an algorithm to efficiently search for matches on AST nodes.
13 // The general idea is to visit all AST nodes with a RecursiveASTVisitor,
51 // bound nodes before the matcher was executed.
53 // We currently only memoize on nodes whose pointers identify the
54 // nodes (\c Stmt and \c Decl, but not \c QualType or \c TypeLoc).
57 // FIXME: Benchmark whether memoization of non-pointer typed nodes
70 // Used to store the result of a match and possibly bound nodes.
73 BoundNodesTreeBuilder Nodes;
131 // It's OK to always overwrite the bound nodes, as if there was
380 // For AST-nodes that don't have an identity, we can't memoize.
393 *Builder = I->second.Nodes;
398 Result.Nodes = *Builder;
399 Result.ResultOfMatch = matchesRecursively(Node, Matcher, &Result.Nodes,
405 *Builder = CachedResult.Nodes;
601 // The order of matching ((which can lead to different nodes being bound in
628 *Builder = I->second.Nodes;
634 Result.Nodes = *Builder;
641 if (Matcher.matches(Parent, this, &Result.Nodes)) {
644 // Reset the results to not include the bound nodes from the failed
646 Result.Nodes = *Builder;
648 Parent, Matcher, &Result.Nodes, MatchMode);
653 // Multiple parents - BFS over the rest of the nodes.
658 Result.Nodes = *Builder;
659 if (Matcher.matches(Queue.front(), this, &Result.Nodes)) {
680 *Builder = CachedResult.Nodes;
685 // the aggregated bound nodes for each match.
895 MatchFinder::MatchResult::MatchResult(const BoundNodes &Nodes,
897 : Nodes(Nodes), Context(Context),