clang  6.0.0svn
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"

Collaboration diagram for clang::diff::Node:
Collaboration graph
[legend]

Public Member Functions

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

Public Attributes

NodeId Parent
 
NodeId LeftMostDescendant
 
NodeId RightMostDescendant
 
int Depth
 
int Height
 
int Shift = 0
 
ast_type_traits::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()

llvm::Optional< StringRef > clang::diff::Node::getIdentifier ( ) const

Definition at line 701 of file ASTDiff.cpp.

References clang::diff::SyntaxTree::Impl::getNode(), Height, clang::None, and Tree.

Referenced by isLeaf().

◆ getQualifiedIdentifier()

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

Definition at line 693 of file ASTDiff.cpp.

References clang::None.

Referenced by isLeaf().

◆ getType()

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

Definition at line 687 of file ASTDiff.cpp.

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

◆ getTypeLabel()

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

Definition at line 691 of file ASTDiff.cpp.

◆ isLeaf()

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

Definition at line 47 of file ASTDiff.h.

References getIdentifier(), and getQualifiedIdentifier().

Member Data Documentation

◆ ASTNode

ast_type_traits::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.

Referenced by getIdentifier().

◆ LeftMostDescendant

NodeId clang::diff::Node::LeftMostDescendant

Definition at line 39 of file ASTDiff.h.

Referenced by clang::diff::getSubtreeBfs().

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


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