johannes updated this revision to Diff 121656.
johannes added a comment.
update
https://reviews.llvm.org/D37005
Files:
include/clang/Tooling/ASTDiff/ASTDiff.h
include/clang/Tooling/ASTDiff/ASTPatch.h
lib/Tooling/ASTDiff/ASTDiff.cpp
lib/Tooling/ASTDiff/ASTPatch.cpp
lib/Tooling/ASTDiff/
johannes added inline comments.
Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:73
public:
+ /// Empty (invalid) SyntaxTree.
+ SyntaxTree();
arphaman wrote:
> Why do you need to create an empty tree? What about using llvm::Optional
> instead?
ok, i use op
johannes updated this revision to Diff 113078.
johannes added a comment.
fixes
https://reviews.llvm.org/D37005
Files:
include/clang/Tooling/ASTDiff/ASTDiff.h
include/clang/Tooling/ASTDiff/ASTPatch.h
lib/Tooling/ASTDiff/ASTDiff.cpp
lib/Tooling/ASTDiff/ASTPatch.cpp
lib/Tooling/ASTDiff/C
arphaman added inline comments.
Comment at: include/clang/Tooling/ASTDiff/ASTDiff.h:73
public:
+ /// Empty (invalid) SyntaxTree.
+ SyntaxTree();
Why do you need to create an empty tree? What about using llvm::Optional
instead?
Comment at: i
arphaman added inline comments.
Comment at: include/clang/Tooling/ASTDiff/ASTPatch.h:1
+//===- ASTDiff.h - Structural patching based on ASTDiff ---*- C++ -*-
-===//
+//
Please update the file name in the comment
Comment at: lib/Tooling/AST
johannes updated this revision to Diff 112926.
johannes edited the summary of this revision.
johannes added a comment.
split to ASTDiff/ASTPatch
https://reviews.llvm.org/D37005
Files:
include/clang/Tooling/ASTDiff/ASTDiff.h
include/clang/Tooling/ASTDiff/ASTPatch.h
lib/Tooling/ASTDiff/ASTD
arphaman added inline comments.
Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:658
+ SourceRange Range;
+ if (auto *Arg = N.ASTNode.get())
+Range = TemplateArgumentLocations.at(&N - &Nodes[0]);
You can drop the `auto *Arg` since Arg is unused.
==
johannes updated this revision to Diff 112845.
johannes retitled this revision from "Add
include/clang/Tooling/ASTDiff/ASTPatch.h" to "[clang-diff] Initial
implementation of patching".
johannes edited the summary of this revision.
johannes added a comment.
use rewriter to patch a third AST
htt