ΒΆtemplate <typename MatcherT, typename NodeT>
SmallVector<clang::ast_matchers::BoundNodes, 1>
match(MatcherT Matcher,
      const NodeT& Node,
      clang::ASTContext& Context)

Description

Returns the results of matching \p Matcher on \p Node. Collects the \c BoundNodes of all callback invocations when matching\p Matcher on \p Node and returns the collected results. Multiple results occur when using matchers like \c forEachDescendant, which generate a result for each sub-match. If you want to find all matches on the sub-tree rooted at \c Node (rather than only the matches on \c Node itself), surround the \c Matcher with a\c findAll().

Declared at: clang/include/clang/ASTMatchers/ASTMatchFinder.h:253

Templates

MatcherT
NodeT

Parameters

MatcherT Matcher
const NodeT& Node
clang::ASTContext& Context