class Subtree
Declaration
class Subtree { /* full declaration omitted */ };
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:486
Member Variables
- private const SyntaxTree::Impl& Tree
- The parent tree.
- private std::vector<NodeId> RootIds
- Maps SNodeIds to original ids.
- private std::vector<SNodeId> LeftMostDescendants
- Maps subtree nodes to their leftmost descendants wtihin the subtree.
- public std::vector<SNodeId> KeyRoots
Method Overview
- public Subtree(const SyntaxTree::Impl & Tree, clang::diff::NodeId SubtreeRoot)
- private void computeKeyRoots(int Leaves)
- public clang::diff::NodeId getIdInRoot(clang::diff::SNodeId Id) const
- public clang::diff::SNodeId getLeftMostDescendant(clang::diff::SNodeId Id) const
- public const clang::diff::Node & getNode(clang::diff::SNodeId Id) const
- public std::string getNodeValue(clang::diff::SNodeId Id) const
- public clang::diff::NodeId getPostorderOffset() const
- public int getSize() const
- private int setLeftMostDescendants()
Methods
¶Subtree(const SyntaxTree::Impl& Tree,
clang::diff::NodeId SubtreeRoot)
Subtree(const SyntaxTree::Impl& Tree,
clang::diff::NodeId SubtreeRoot)
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:498
Parameters
- const SyntaxTree::Impl& Tree
- clang::diff::NodeId SubtreeRoot
¶void computeKeyRoots(int Leaves)
void computeKeyRoots(int Leaves)
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:540
Parameters
- int Leaves
¶clang::diff::NodeId getIdInRoot(
clang::diff::SNodeId Id) const
clang::diff::NodeId getIdInRoot(
clang::diff::SNodeId Id) const
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:504
Parameters
¶clang::diff::SNodeId getLeftMostDescendant(
clang::diff::SNodeId Id) const
clang::diff::SNodeId getLeftMostDescendant(
clang::diff::SNodeId Id) const
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:511
Parameters
¶const clang::diff::Node& getNode(
clang::diff::SNodeId Id) const
const clang::diff::Node& getNode(
clang::diff::SNodeId Id) const
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:508
Parameters
¶std::string getNodeValue(
clang::diff::SNodeId Id) const
std::string getNodeValue(
clang::diff::SNodeId Id) const
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:519
Parameters
¶clang::diff::NodeId getPostorderOffset() const
clang::diff::NodeId getPostorderOffset() const
Description
Returns the postorder index of the leftmost descendant in the subtree.
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:516
¶int getSize() const
int getSize() const
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:503
¶int setLeftMostDescendants()
int setLeftMostDescendants()
Description
Returns the number of leafs in the subtree.
Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:525