Go to the documentation of this file.
19 #ifndef LLVM_CLANG_TOOLING_ASTDIFF_ASTDIFF_H
20 #define LLVM_CLANG_TOOLING_ASTDIFF_ASTDIFF_H
120 std::unique_ptr<Impl> DiffImpl;
Represents the AST of a TranslationUnit.
NodeId getMapped(const SyntaxTree &SourceTree, NodeId Id) const
StringRef getTypeLabel() const
std::unique_ptr< Impl > TreeImpl
PreorderIterator end() const
ASTNodeKind getType() const
Within a tree, this identifies a node by its preorder offset.
const ASTContext & getASTContext() const
double MinSimilarity
During bottom-up matching, match only nodes with at least this value as the ratio of their common des...
SmallVector< NodeId, 4 > Children
ASTDiff(SyntaxTree &Src, SyntaxTree &Dst, const ComparisonOptions &Options)
SyntaxTree(T *Node, ASTContext &AST)
Constructs a tree from any AST node.
NodeId LeftMostDescendant
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
int findPositionInParent(NodeId Id) const
DynTypedNode DynTypedNode
std::string getNodeValue(NodeId Id) const
Serialize the node attributes to a string representation.
SyntaxTree objects represent subtrees of the AST.
llvm::Optional< std::string > getQualifiedIdentifier() const
std::pair< unsigned, unsigned > getSourceRangeOffsets(const Node &N) const
llvm::Optional< StringRef > getIdentifier() const
bool isMatchingAllowed(const Node &N1, const Node &N2) const
Returns false if the nodes should never be matched.
int MaxSize
Whenever two subtrees are matched in the bottom-up phase, the optimal mapping is computed,...
Represents a Clang AST node, alongside some additional information.
StringRef getFilename() const
PreorderIterator begin() const
const Node & getNode(NodeId Id) const
bool isSame(ASTNodeKind Other) const
Returns true if this and Other represent the same kind.
SyntaxTree(ASTContext &AST)
Constructs a tree from a translation unit.
int MinHeight
During top-down matching, only consider nodes of at least this height.
NodeId RightMostDescendant