class MatcherInterface
Declaration
template <typename T>
class MatcherInterface : public DynMatcherInterface { /* full declaration omitted */ };
Description
Generic interface for matchers on an AST node of type T. Implement this if your matcher may need to inspect the children or descendants of the node or bind matched nodes to names. If you are writing a simple matcher that only inspects properties of the current node and doesn't care about its children or descendants, implement SingleNodeMatcherInterface instead.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:367
Inherits from: DynMatcherInterface
Templates
- T
Method Overview
- public bool dynMatches(const clang::DynTypedNode & DynNode, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
- public virtual bool matches(const T & Node, clang::ast_matchers::internal::ASTMatchFinder * Finder, clang::ast_matchers::internal::BoundNodesTreeBuilder * Builder) const
Inherited from DynMatcherInterface:
Methods
¶bool dynMatches(
const clang::DynTypedNode& DynNode,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
bool dynMatches(
const clang::DynTypedNode& DynNode,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Returns true if \p DynNode can be matched. May bind \p DynNode to an ID via \p Builder, or recurse into the AST via \p Finder.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:377
Parameters
- const clang::DynTypedNode& DynNode
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder
¶virtual bool matches(
const T& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
virtual bool matches(
const T& Node,
clang::ast_matchers::internal::ASTMatchFinder*
Finder,
clang::ast_matchers::internal::
BoundNodesTreeBuilder* Builder) const
Description
Returns true if 'Node' can be matched. May bind 'Node' to an ID via 'Builder', or recurse into the AST via 'Finder'.
Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:373
Parameters
- const T& Node
- clang::ast_matchers::internal::ASTMatchFinder* Finder
- clang::ast_matchers::internal:: BoundNodesTreeBuilder* Builder