class BoundNodes
Declaration
class BoundNodes { /* full declaration omitted */ };
Description
Maps string IDs to AST nodes matched by parts of a matcher. The bound nodes are generated by calling \c bind("id") on the node matchers of the nodes we want to access later. The instances of BoundNodes are created by \c MatchFinder when the user's callbacks are executed every time a match is found.
Declared at: clang/include/clang/ASTMatchers/ASTMatchers.h:107
Member Variables
- private internal::BoundNodesMap MyBoundNodes
Method Overview
- private BoundNodes(internal::BoundNodesMap & MyBoundNodes)
- public const clang::ast_matchers::BoundNodes::IDToNodeMap & getMap() const
- public template <typename T>const T * getNodeAs(llvm::StringRef ID) const
Methods
¶BoundNodes(internal::BoundNodesMap& MyBoundNodes)
BoundNodes(internal::BoundNodesMap& MyBoundNodes)
Description
Create BoundNodes from a pre-filled map of bindings.
Declared at: clang/include/clang/ASTMatchers/ASTMatchers.h:132
Parameters
- internal::BoundNodesMap& MyBoundNodes
¶const clang::ast_matchers::BoundNodes::
IDToNodeMap&
getMap() const
const clang::ast_matchers::BoundNodes::
IDToNodeMap&
getMap() const
Description
Retrieve mapping from binding identifiers to bound nodes.
Declared at: clang/include/clang/ASTMatchers/ASTMatchers.h:124
¶template <typename T>
const T* getNodeAs(llvm::StringRef ID) const
template <typename T>
const T* getNodeAs(llvm::StringRef ID) const
Description
Returns the AST node bound to \c ID. Returns NULL if there was no node bound to \c ID or if there is a node but it cannot be converted to the specified type.
Declared at: clang/include/clang/ASTMatchers/ASTMatchers.h:114
Templates
- T