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

Methods

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)

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:540

Parameters

int Leaves

clang::diff::NodeId getIdInRoot(
    clang::diff::SNodeId Id) const

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:504

Parameters

clang::diff::SNodeId Id

clang::diff::SNodeId getLeftMostDescendant(
    clang::diff::SNodeId Id) const

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:511

Parameters

clang::diff::SNodeId Id

const clang::diff::Node& getNode(
    clang::diff::SNodeId Id) const

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:508

Parameters

clang::diff::SNodeId Id

std::string getNodeValue(
    clang::diff::SNodeId Id) const

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:519

Parameters

clang::diff::SNodeId Id

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

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:503

int setLeftMostDescendants()

Description

Returns the number of leafs in the subtree.

Declared at: clang/lib/Tooling/ASTDiff/ASTDiff.cpp:525