class HasAncestorMatcher

Declaration

template <typename T, typename AncestorT>
class HasAncestorMatcher { /* full declaration omitted */ };

Description

Matches nodes of type \c T that have at least one ancestor node of type \c AncestorT for which the given inner matcher matches. \c AncestorT must be an AST base type.

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

Templates

T
AncestorT

Member Variables

private clang::ast_matchers::internal::DynTypedMatcher AncestorMatcher

Method Overview

  • public HasAncestorMatcher<T, AncestorT>(const Matcher<AncestorT> & AncestorMatcher)
  • public bool matches(const T & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const

Methods

HasAncestorMatcher<T, AncestorT>(
    const Matcher<AncestorT>& AncestorMatcher)

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

Parameters

const Matcher<AncestorT>& AncestorMatcher

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:1711

Parameters

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