Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-03 Thread Eric Liu via cfe-commits
ioeric abandoned this revision. ioeric added a comment. Start a new revision to put applyAllReplacementsAndFormat into non-core libTooling . http://reviews.llvm.org/D17761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-02 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 49620. ioeric added a comment. - Removed definitions that were forgotten. http://reviews.llvm.org/D17761 Files: include/clang/Basic/SourceManager.h include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h include/clang/Tooling/Replaceme

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-02 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 49619. ioeric added a comment. - Removed all applyAllReplacementsAndFormat(*); added formatRewrittenCode in clangTooling. http://reviews.llvm.org/D17761 Files: include/clang/Basic/SourceManager.h include/clang/Format/Format.h include/clang/Tooling/Cor

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-02 Thread Manuel Klimek via cfe-commits
klimek added a comment. Ok, after thinking about it a bit, here is a new plan: - get rid of applyAllReplacementsAndFormat (in all its forms) - implement a formatRewrittenCode(Rewriter&, ...); as Daniel wants libFormat to stay file focused, we can put that into non-core libTooling; it'll figure o

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-01 Thread Daniel Jasper via cfe-commits
djasper added a comment. I don't think this is the right abstraction: - Formatting so far is fundamentally per file. Grouping replacements per file is something that can be done outside of libFormat. - The logic to sort and deduplicate Replacements is important independent of whether formatting

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-01 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 49493. ioeric added a comment. - Added getOrCreateFileID interface in SourceManager. http://reviews.llvm.org/D17761 Files: include/clang/Basic/SourceManager.h include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/CMakeList

Re: [PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-01 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 49487. ioeric added a comment. - Fixed commenting issue due to merge. http://reviews.llvm.org/D17761 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/CMakeLists.txt lib/Format/Format.cpp lib/Tooling/Core/Repl

[PATCH] D17761: Added applyAllReplacementsAndFormat that works for multiple files.

2016-03-01 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a reviewer: klimek. ioeric added subscribers: klimek, cfe-commits. Added applyAllReplacementsAndFormat that works for multiple files. http://reviews.llvm.org/D17761 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/