clang: clang::diff::SyntaxTree::Impl Class Reference (original) (raw)
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 |
|
|
Represents the AST of a TranslationUnit.
Definition at line 113 of file ASTDiff.cpp.
◆ Impl() [1/5]
◆ Impl() [2/5]
Constructs a tree from an AST node.
Definition at line 266 of file ASTDiff.cpp.
◆ Impl() [3/5]
◆ Impl() [4/5]
template<class T >
clang::diff::SyntaxTree::Impl::Impl ( SyntaxTree * Parent, std::enable_if_t< std::is_base_of_v< Stmt, T >, T > * Node, ASTContext & AST ) |
inline |
◆ Impl() [5/5]
template<class T >
clang::diff::SyntaxTree::Impl::Impl ( SyntaxTree * Parent, std::enable_if_t< std::is_base_of_v< Decl, T >, T > * Node, ASTContext & AST ) |
inline |
◆ addNode()
void clang::diff::SyntaxTree::Impl::addNode ( Node & N) |
inline |
◆ begin()
◆ end()
◆ findPositionInParent()
int clang::diff::SyntaxTree::Impl::findPositionInParent |
( |
NodeId |
Id, |
bool |
Shifted = false |
|
|
) |
const |
|
|
◆ getDeclValue()
std::string clang::diff::SyntaxTree::Impl::getDeclValue |
( |
const Decl * |
D |
) |
const |
◆ getMutableNode()
Node & clang::diff::SyntaxTree::Impl::getMutableNode ( NodeId Id) |
inline |
◆ getNode()
const Node & clang::diff::SyntaxTree::Impl::getNode ( NodeId Id) const |
inline |
◆ getNodeValue() [1/2]
std::string clang::diff::SyntaxTree::Impl::getNodeValue |
( |
const Node & |
Node |
) |
const |
◆ getNodeValue() [2/2]
std::string clang::diff::SyntaxTree::Impl::getNodeValue |
( |
NodeId |
Id |
) |
const |
◆ getNumberOfDescendants()
int clang::diff::SyntaxTree::Impl::getNumberOfDescendants |
( |
NodeId |
Id |
) |
const |
◆ getRelativeName() [1/2]
std::string clang::diff::SyntaxTree::Impl::getRelativeName |
( |
const NamedDecl * |
ND |
) |
const |
◆ getRelativeName() [2/2]
std::string clang::diff::SyntaxTree::Impl::getRelativeName |
( |
const NamedDecl * |
ND, |
const DeclContext * |
Context |
|
|
) |
const |
|
|
◆ getRootId()
NodeId clang::diff::SyntaxTree::Impl::getRootId ( ) const |
inline |
◆ getSize()
int clang::diff::SyntaxTree::Impl::getSize ( ) const |
inline |
◆ getStmtValue()
std::string clang::diff::SyntaxTree::Impl::getStmtValue |
( |
const Stmt * |
S |
) |
const |
◆ isInSubtree()
bool clang::diff::SyntaxTree::Impl::isInSubtree |
( |
NodeId |
Id, |
NodeId |
SubtreeRoot |
|
|
) |
const |
|
|
◆ isValidNodeId()
bool clang::diff::SyntaxTree::Impl::isValidNodeId ( NodeId Id) const |
inline |
◆ AST
◆ Leaves
std::vector<NodeId> clang::diff::SyntaxTree::Impl::Leaves
◆ Nodes
std::vector<Node> clang::diff::SyntaxTree::Impl::Nodes
◆ NodesBfs
std::vector<NodeId> clang::diff::SyntaxTree::Impl::NodesBfs
◆ Parent
◆ PostorderIds
std::vector<int> clang::diff::SyntaxTree::Impl::PostorderIds
◆ TypePP
The documentation for this class was generated from the following file: