clang 20.0.0git
|
Represents the AST of a TranslationUnit. More...
Public Member Functions | |
Impl (SyntaxTree *Parent, ASTContext &AST) | |
Impl (SyntaxTree *Parent, Decl *N, ASTContext &AST) | |
Constructs a tree from an AST node. | |
Impl (SyntaxTree *Parent, Stmt *N, ASTContext &AST) | |
template<class T > | |
Impl (SyntaxTree *Parent, std::enable_if_t< std::is_base_of_v< Stmt, T >, T > *Node, ASTContext &AST) | |
template<class T > | |
Impl (SyntaxTree *Parent, std::enable_if_t< std::is_base_of_v< Decl, T >, T > *Node, ASTContext &AST) | |
int | getSize () const |
NodeId | getRootId () const |
PreorderIterator | begin () const |
PreorderIterator | end () const |
const Node & | getNode (NodeId Id) const |
Node & | getMutableNode (NodeId Id) |
bool | isValidNodeId (NodeId Id) const |
void | addNode (Node &N) |
int | getNumberOfDescendants (NodeId Id) const |
bool | isInSubtree (NodeId Id, NodeId SubtreeRoot) const |
int | findPositionInParent (NodeId Id, bool Shifted=false) const |
std::string | getRelativeName (const NamedDecl *ND, const DeclContext *Context) const |
std::string | getRelativeName (const NamedDecl *ND) const |
std::string | getNodeValue (NodeId Id) const |
std::string | getNodeValue (const Node &Node) const |
std::string | getDeclValue (const Decl *D) const |
std::string | getStmtValue (const Stmt *S) const |
Public Attributes | |
SyntaxTree * | Parent |
ASTContext & | AST |
PrintingPolicy | TypePP |
std::vector< Node > | Nodes |
Nodes in preorder. | |
std::vector< NodeId > | Leaves |
std::vector< int > | PostorderIds |
std::vector< NodeId > | NodesBfs |
Represents the AST of a TranslationUnit.
Definition at line 113 of file ASTDiff.cpp.
clang::diff::SyntaxTree::Impl::Impl | ( | SyntaxTree * | Parent, |
ASTContext & | AST | ||
) |
Definition at line 261 of file ASTDiff.cpp.
References clang::PrintingPolicy::AnonymousTagLocations, and TypePP.
clang::diff::SyntaxTree::Impl::Impl | ( | SyntaxTree * | Parent, |
Decl * | N, | ||
ASTContext & | AST | ||
) |
Constructs a tree from an AST node.
Definition at line 266 of file ASTDiff.cpp.
clang::diff::SyntaxTree::Impl::Impl | ( | SyntaxTree * | Parent, |
Stmt * | N, | ||
ASTContext & | AST | ||
) |
Definition at line 273 of file ASTDiff.cpp.
|
inline |
Definition at line 120 of file ASTDiff.cpp.
|
inline |
Definition at line 124 of file ASTDiff.cpp.
|
inline |
Definition at line 146 of file ASTDiff.cpp.
References Nodes.
|
inline |
Definition at line 140 of file ASTDiff.cpp.
References getRootId().
|
inline |
Definition at line 141 of file ASTDiff.cpp.
References getSize().
Definition at line 338 of file ASTDiff.cpp.
References clang::diff::Node::Children, E, clang::diff::SyntaxTree::getNode(), Id, clang::diff::Node::Parent, Parent, and clang::diff::Node::Shift.
std::string clang::diff::SyntaxTree::Impl::getDeclValue | ( | const Decl * | D | ) | const |
Definition at line 423 of file ASTDiff.cpp.
References D,