clang 22.0.0git
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 699 of file ASTDiff.cpp.

References ASTNode.

◆ getQualifiedIdentifier()

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

Definition at line 691 of file ASTDiff.cpp.

References ASTNode.

◆ getType()

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

Definition at line 687 of file ASTDiff.cpp.

References ASTNode.

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

◆ getTypeLabel()

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

Definition at line 689 of file ASTDiff.cpp.

References getType().

◆ isLeaf()

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

Definition at line 47 of file ASTDiff.h.

References Children.

Member Data Documentation

◆ ASTNode

◆ Change

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

Definition at line 43 of file ASTDiff.h.

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

◆ 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: