class ForEachDescendantMatcher

Declaration

template <typename T, typename DescendantT>
class ForEachDescendantMatcher { /* full declaration omitted */ };

Description

Matches nodes of type T that have at least one descendant node of type DescendantT for which the given inner matcher matches. DescendantT must be an AST base type. As opposed to HasDescendantMatcher, ForEachDescendantMatcher will match for each descendant node that matches instead of only for the first.

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1725

Templates

T
DescendantT

Member Variables

private clang::ast_matchers::internal::DynTypedMatcher DescendantMatcher

Method Overview

  • public ForEachDescendantMatcher<T, DescendantT>(const Matcher<DescendantT> & DescendantMatcher)
  • public bool matches(const T & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const

Methods

ForEachDescendantMatcher<T, DescendantT>(
    const Matcher<DescendantT>& DescendantMatcher)

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1732

Parameters

const Matcher<DescendantT>& DescendantMatcher

bool matches(
    const T& Node,
    clang::ast_matchers::internal::ASTMatchFinder*
        Finder,
    clang::ast_matchers::internal::
        BoundNodesTreeBuilder* Builder) const

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1736

Parameters

const T& Node
clang::ast_matchers::internal::ASTMatchFinder* Finder
clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder