Re: [PATCH] D24829: [clang-format] support header deletion in cleanupAroundReplacemnts.

2016-09-23 Thread Eric Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL282253: [clang-format] support header deletion in cleanupAroundReplacemnts. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D24829?vs=72285&id=72286#toc Repository: rL LLVM h

Re: [PATCH] D24829: [clang-format] support header deletion in cleanupAroundReplacemnts.

2016-09-23 Thread Eric Liu via cfe-commits
ioeric updated this revision to Diff 72285. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed comments. https://reviews.llvm.org/D24829 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTe

Re: [PATCH] D24829: [clang-format] support header deletion in cleanupAroundReplacemnts.

2016-09-23 Thread Daniel Jasper via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Comment at: lib/Format/Format.cpp:1557 @@ +1556,3 @@ + const std::set HeadersToDelete) { + if (HeadersToDelete.find(HeaderName) != HeadersTo

[PATCH] D24829: [clang-format] support header deletion in cleanupAroundReplacemnts.

2016-09-22 Thread Eric Liu via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added subscribers: klimek, cfe-commits. - If a replacement has offset UINT_MAX, length 0, and a replacement text that is an #include directive, this will insert the #include into the correct block in the \p Code. - If a rep