Commit ab1add6a authored by Kazu Hirata's avatar Kazu Hirata
Browse files

[clang] Move the definition of ASTDiff (NFC)

This patch moves the definition of ASTDiff later within the header
file.

Without this patch, the header depends on the forward decalrations of
SyntaxTree and ComparisonOptions from another header file, which is
not desirable.  Since SyntaxTree and ComparisonOptions are defined in
ASTDiff.h, we can move the definition of ASTDiff later and stop
relying on the forward declarations from another header file.
parent 32dc14f8
......@@ -48,20 +48,6 @@ struct Node {
llvm::Optional<std::string> getQualifiedIdentifier() const;
};
class ASTDiff {
public:
ASTDiff(SyntaxTree &Src, SyntaxTree &Dst, const ComparisonOptions &Options);
~ASTDiff();
// Returns the ID of the node that is mapped to the given node in SourceTree.
NodeId getMapped(const SyntaxTree &SourceTree, NodeId Id) const;
class Impl;
private:
std::unique_ptr<Impl> DiffImpl;
};
/// SyntaxTree objects represent subtrees of the AST.
/// They can be constructed from any Decl or Stmt.
class SyntaxTree {
......@@ -120,6 +106,20 @@ struct ComparisonOptions {
}
};
class ASTDiff {
public:
ASTDiff(SyntaxTree &Src, SyntaxTree &Dst, const ComparisonOptions &Options);
~ASTDiff();
// Returns the ID of the node that is mapped to the given node in SourceTree.
NodeId getMapped(const SyntaxTree &SourceTree, NodeId Id) const;
class Impl;
private:
std::unique_ptr<Impl> DiffImpl;
};
} // end namespace diff
} // end namespace clang
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment