19#ifndef LLVM_CLANG_TOOLING_ASTDIFF_ASTDIFF_H
20#define LLVM_CLANG_TOOLING_ASTDIFF_ASTDIFF_H
121 std::unique_ptr<Impl> DiffImpl;
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
constexpr bool isSame(ASTNodeKind Other) const
Returns true if this and Other represent the same kind.
NodeId getMapped(const SyntaxTree &SourceTree, NodeId Id) const
Represents the AST of a TranslationUnit.
SyntaxTree objects represent subtrees of the AST.
const Node & getNode(NodeId Id) const
StringRef getFilename() const
int findPositionInParent(NodeId Id) const
SyntaxTree(SyntaxTree &&Other)=default
const ASTContext & getASTContext() const
PreorderIterator begin() const
std::pair< unsigned, unsigned > getSourceRangeOffsets(const Node &N) const
std::unique_ptr< Impl > TreeImpl
SyntaxTree(T *Node, ASTContext &AST)
Constructs a tree from any AST node.
PreorderIterator end() const
std::string getNodeValue(NodeId Id) const
Serialize the node attributes to a string representation.
DynTypedNode DynTypedNode
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
@ Other
Other implicit parameter.
int MinHeight
During top-down matching, only consider nodes of at least this height.
double MinSimilarity
During bottom-up matching, match only nodes with at least this value as the ratio of their common des...
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,...
Within a tree, this identifies a node by its preorder offset.
Represents a Clang AST node, alongside some additional information.
NodeId RightMostDescendant
std::optional< std::string > getQualifiedIdentifier() const
std::optional< StringRef > getIdentifier() const
ASTNodeKind getType() const
NodeId LeftMostDescendant
StringRef getTypeLabel() const
SmallVector< NodeId, 4 > Children