class BoundNodesMap

Declaration

class BoundNodesMap { /* full declaration omitted */ };

Description

Internal version of BoundNodes. Holds all the bound nodes.

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

Member Variables

private clang::ast_matchers::internal::BoundNodesMap:: IDToNodeMap NodeMap

Method Overview

  • public void addNode(llvm::StringRef ID, const clang::DynTypedNode & DynNode)
  • public const clang::ast_matchers::internal::BoundNodesMap::IDToNodeMap & getMap() const
  • public clang::DynTypedNode getNode(llvm::StringRef ID) const
  • public template <typename T>const T * getNodeAs(llvm::StringRef ID) const
  • public bool isComparable() const

Methods

void addNode(llvm::StringRef ID,
             const clang::DynTypedNode& DynNode)

Description

Adds \c Node to the map with key \c ID. The node's base type should be in NodeBaseType or it will be unaccessible.

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

Parameters

llvm::StringRef ID
const clang::DynTypedNode& DynNode

const clang::ast_matchers::internal::
    BoundNodesMap::IDToNodeMap&
    getMap() const

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

clang::DynTypedNode getNode(
    llvm::StringRef ID) const

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

Parameters

llvm::StringRef ID

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/ASTMatchersInternal.h:230

Templates

T

Parameters

llvm::StringRef ID

bool isComparable() const

Description

Returns \c true if this \c BoundNodesMap can be compared, i.e. all stored nodes have memoization data.

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