clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
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 485 of file ASTDiff.cpp.

Constructor & Destructor Documentation

◆ Subtree()

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

Definition at line 497 of file ASTDiff.cpp.

References clang::diff::getSubtreePostorder(), and Tree.

Member Function Documentation

◆ getIdInRoot()

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

Definition at line 503 of file ASTDiff.cpp.

References Id.

Referenced by clang::diff::ZhangShashaMatcher::getMatchingNodes().

◆ getLeftMostDescendant()

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

Definition at line 510 of file ASTDiff.cpp.

References Id.

Referenced by clang::diff::ZhangShashaMatcher::getMatchingNodes().

◆ getNode()

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

Definition at line 507 of file ASTDiff.cpp.

References Id, and Tree.

◆ getNodeValue()

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

Definition at line 518 of file ASTDiff.cpp.

References Id, and Tree.

◆ getPostorderOffset()

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

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

Definition at line 515 of file ASTDiff.cpp.

References Tree.

◆ getSize()

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

Member Data Documentation

◆ KeyRoots

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

Definition at line 495 of file ASTDiff.cpp.


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