clang 20.0.0git
Classes | Typedefs | Enumerations | Functions
clang::diff Namespace Reference

Classes

class  ASTDiff
 
struct  ComparisonOptions
 
struct  Node
 Represents a Clang AST node, alongside some additional information. More...
 
struct  NodeId
 Within a tree, this identifies a node by its preorder offset. More...
 
struct  SNodeId
 Identifies a node in a subtree by its postorder offset, starting at 1. More...
 
class  Subtree
 
class  SyntaxTree
 SyntaxTree objects represent subtrees of the AST. More...
 
class  ZhangShashaMatcher
 Implementation of Zhang and Shasha's Algorithm for tree edit distance. More...
 

Typedefs

using DynTypedNode = DynTypedNode
 

Enumerations

enum  ChangeKind {
  None , Delete , Update , Insert ,
  Move , UpdateMove
}
 

Functions

static bool isSpecializedNodeExcluded (const Decl *D)
 
static bool isSpecializedNodeExcluded (const Stmt *S)
 
static bool isSpecializedNodeExcluded (CXXCtorInitializer *I)
 
template<class T >
static bool isNodeExcluded (const SourceManager &SrcMgr, T *N)
 
static std::vector< NodeIdgetSubtreePostorder (const SyntaxTree::Impl &Tree, NodeId Root)
 
static std::vector< NodeIdgetSubtreeBfs (const SyntaxTree::Impl &Tree, NodeId Root)
 
static const DeclContextgetEnclosingDeclContext (ASTContext &AST, const Stmt *S)
 
static std::string getInitializerValue (const CXXCtorInitializer *Init, const PrintingPolicy &TypePP)
 

Typedef Documentation

◆ DynTypedNode

Definition at line 18 of file ASTDiffInternal.h.

Enumeration Type Documentation

◆ ChangeKind

Enumerator
None 
Delete 
Update 
Insert 
Move 
UpdateMove 

Definition at line 28 of file ASTDiff.h.

Function Documentation

◆ getEnclosingDeclContext()

static const DeclContext * clang::diff::getEnclosingDeclContext ( ASTContext AST,
const Stmt S 
)
static

◆ getInitializerValue()

static std::string clang::diff::getInitializerValue ( const CXXCtorInitializer Init,
const PrintingPolicy TypePP 
)
static

◆ getSubtreeBfs()

static std::vector< NodeId > clang::diff::getSubtreeBfs ( const SyntaxTree::Impl Tree,
NodeId  Root 
)
static

Definition at line 293 of file ASTDiff.cpp.

References Tree.

◆ getSubtreePostorder()

static std::vector< NodeId > clang::diff::getSubtreePostorder ( const SyntaxTree::Impl Tree,
NodeId  Root 
)
static

Definition at line 280 of file ASTDiff.cpp.

References clang::diff::Node::Children, Id, and Tree.

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

◆ isNodeExcluded()

template<class T >
static bool clang::diff::isNodeExcluded ( const SourceManager SrcMgr,
T N 
)
static

◆ isSpecializedNodeExcluded() [1/3]

static bool clang::diff::isSpecializedNodeExcluded ( const Decl D)
static

Definition at line 165 of file ASTDiff.cpp.

References D, and clang::Decl::isImplicit().

Referenced by isNodeExcluded().

◆ isSpecializedNodeExcluded() [2/3]

static bool clang::diff::isSpecializedNodeExcluded ( const Stmt S)
static

Definition at line 166 of file ASTDiff.cpp.

◆ isSpecializedNodeExcluded() [3/3]

static bool clang::diff::isSpecializedNodeExcluded ( CXXCtorInitializer I)
static

Definition at line 167 of file ASTDiff.cpp.

References clang::CXXCtorInitializer::isWritten().