[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-11-05 Thread Johannes Altmanninger via Phabricator via cfe-commits
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

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-29 Thread Johannes Altmanninger via Phabricator via cfe-commits
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

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-29 Thread Johannes Altmanninger via Phabricator via cfe-commits
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

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-29 Thread Alex Lorenz via Phabricator via cfe-commits
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:

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-29 Thread Alex Lorenz via Phabricator via cfe-commits
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:

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-28 Thread Johannes Altmanninger via Phabricator via cfe-commits
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

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/ASTDiff/ASTDiff.cpp:658 + SourceRange Range; + if (auto *Arg = N.ASTNode.get()) +Range = TemplateArgumentLocations.at( - [0]); You can drop the `auto *Arg` since Arg is unused.

[PATCH] D37005: [clang-diff] Initial implementation of patching

2017-08-27 Thread Johannes Altmanninger via Phabricator via cfe-commits
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