clang 23.0.0git
clang::diff::Subtree Class Reference

Public Member Functions

 Subtree (const SyntaxTree::Impl &Tree, NodeId SubtreeRoot)
int getSize () const
NodeId getIdInRoot (SNodeId Id) const
const NodegetNode (SNodeId Id) const
SNodeId getLeftMostDescendant (SNodeId Id) const
NodeId getPostorderOffset () const
 Returns the postorder index of the leftmost descendant in the subtree.
std::string getNodeValue (SNodeId Id) const

Public Attributes

std::vector< SNodeIdKeyRoots

Detailed Description

Definition at line 487 of file ASTDiff.cpp.

Constructor & Destructor Documentation

◆ Subtree()

clang::diff::Subtree::Subtree ( const SyntaxTree::Impl & Tree,
NodeId SubtreeRoot )
inline

Definition at line 499 of file ASTDiff.cpp.

References clang::diff::getSubtreePostorder().

Member Function Documentation

◆ getIdInRoot()

NodeId clang::diff::Subtree::getIdInRoot ( SNodeId Id) const
inline

Definition at line 505 of file ASTDiff.cpp.

References getSize().

Referenced by getNode(), getNodeValue(), and getPostorderOffset().

◆ getLeftMostDescendant()

SNodeId clang::diff::Subtree::getLeftMostDescendant ( SNodeId Id) const
inline

Definition at line 512 of file ASTDiff.cpp.

References getSize().

◆ getNode()

const Node & clang::diff::Subtree::getNode ( SNodeId Id) const
inline

Definition at line 509 of file ASTDiff.cpp.

References getIdInRoot().

◆ getNodeValue()

std::string clang::diff::Subtree::getNodeValue ( SNodeId Id) const
inline

Definition at line 520 of file ASTDiff.cpp.

References getIdInRoot().

◆ getPostorderOffset()

NodeId clang::diff::Subtree::getPostorderOffset ( ) const
inline

Returns the postorder index of the leftmost descendant in the subtree.

Definition at line 517 of file ASTDiff.cpp.

References getIdInRoot().

◆ getSize()

int clang::diff::Subtree::getSize ( ) const
inline

Definition at line 504 of file ASTDiff.cpp.

Referenced by getIdInRoot(), and getLeftMostDescendant().

Member Data Documentation

◆ KeyRoots

std::vector<SNodeId> clang::diff::Subtree::KeyRoots

Definition at line 497 of file ASTDiff.cpp.


The documentation for this class was generated from the following file: