clang 22.0.0git
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()

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

◆ getInitializerValue()

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

◆ getSubtreeBfs()

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

◆ getSubtreePostorder()

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

◆ isNodeExcluded()

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

◆ isSpecializedNodeExcluded() [1/3]

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

Definition at line 165 of file ASTDiff.cpp.

References clang::Decl::isImplicit().

Referenced by isNodeExcluded().

◆ isSpecializedNodeExcluded() [2/3]

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

Definition at line 166 of file ASTDiff.cpp.

◆ isSpecializedNodeExcluded() [3/3]

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

Definition at line 167 of file ASTDiff.cpp.

References clang::CXXCtorInitializer::isWritten().