clang 19.0.0git
Public Member Functions | Public Attributes | List of all members
clang::diff::Node Struct Reference

Represents a Clang AST node, alongside some additional information. More...

#include "clang/Tooling/ASTDiff/ASTDiff.h"

Public Member Functions

ASTNodeKind getType () const
 
StringRef getTypeLabel () const
 
bool isLeaf () const
 
std::optional< StringRef > getIdentifier () const
 
std::optional< std::string > getQualifiedIdentifier () const
 

Public Attributes

NodeId Parent
 
NodeId LeftMostDescendant
 
NodeId RightMostDescendant
 
int Depth
 
int Height
 
int Shift = 0
 
DynTypedNode ASTNode
 
SmallVector< NodeId, 4 > Children
 
ChangeKind Change = None
 

Detailed Description

Represents a Clang AST node, alongside some additional information.

Definition at line 38 of file ASTDiff.h.

Member Function Documentation

◆ getIdentifier()

std::optional< StringRef > clang::diff::Node::getIdentifier ( ) const

Definition at line 698 of file ASTDiff.cpp.

◆ getQualifiedIdentifier()

std::optional< std::string > clang::diff::Node::getQualifiedIdentifier ( ) const

Definition at line 690 of file ASTDiff.cpp.

◆ getType()

ASTNodeKind clang::diff::Node::getType ( ) const

Definition at line 686 of file ASTDiff.cpp.

Referenced by clang::diff::ComparisonOptions::isMatchingAllowed().

◆ getTypeLabel()

StringRef clang::diff::Node::getTypeLabel ( ) const

Definition at line 688 of file ASTDiff.cpp.

◆ isLeaf()

bool clang::diff::Node::isLeaf ( ) const
inline

Definition at line 47 of file ASTDiff.h.

References Children.

Member Data Documentation

◆ ASTNode

DynTypedNode clang::diff::Node::ASTNode

◆ Change

ChangeKind clang::diff::Node::Change = None

Definition at line 43 of file ASTDiff.h.

Referenced by clang::diff::ASTDiff::Impl::computeChangeKinds().

◆ Children

SmallVector<NodeId, 4> clang::diff::Node::Children

◆ Depth

int clang::diff::Node::Depth

Definition at line 40 of file ASTDiff.h.

◆ Height

int clang::diff::Node::Height

Definition at line 40 of file ASTDiff.h.

◆ LeftMostDescendant

NodeId clang::diff::Node::LeftMostDescendant

Definition at line 39 of file ASTDiff.h.

◆ Parent

NodeId clang::diff::Node::Parent

Definition at line 39 of file ASTDiff.h.

Referenced by clang::diff::SyntaxTree::Impl::findPositionInParent().

◆ RightMostDescendant

NodeId clang::diff::Node::RightMostDescendant

◆ Shift

int clang::diff::Node::Shift = 0

Definition at line 40 of file ASTDiff.h.

Referenced by clang::diff::SyntaxTree::Impl::findPositionInParent().


The documentation for this struct was generated from the following files: