[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287228: [include-fixer] Refactor include fixer to be usable as a plugin (authored by d0k). Changed prior to commit: https://reviews.llvm.org/D26752?vs=78354&id=78366#toc Repository: rL LLVM https://

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D26752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); ioeric wrote: > hokein wrote: > > ioeric wrote: > > > b

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 78354. bkramer added a comment. - Turn loop into an assertions, there should never be more than one replacement coming back. https://reviews.llvm.org/D26752 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); hokein wrote: > ioeric wrote: > > bkramer wrote: > > > h

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); ioeric wrote: > bkramer wrote: > > hokein wrote: > > > I

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); bkramer wrote: > hokein wrote: > > I have a concern that

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: include-fixer/IncludeFixer.cpp:136 + +auto Begin = StartOfFile.getLocWithOffset(Placed.getOffset()); +auto End = Begin.getLocWithOffset(Placed.getLength()); hokein wrote: > I have a concern that `Placed` here mig

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Benjamin Kramer via cfe-commits
bkramer updated this revision to Diff 78345. bkramer marked 7 inline comments as done. bkramer added a comment. - Address review comments. https://reviews.llvm.org/D26752 Files: include-fixer/CMakeLists.txt include-fixer/IncludeFixer.cpp include-fixer/IncludeFixer.h include-fixer/plugin

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-17 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: include-fixer/IncludeFixer.cpp:64 getIncludeFixerContext(const clang::SourceManager &SourceManager, clang::HeaderSearch &HeaderSearch) { +return SemaSource.getIncludeFixerContext(SourceManager, HeaderSearc

[PATCH] D26752: [include-fixer] Refactor include fixer to be usable as a plugin

2016-11-16 Thread Benjamin Kramer via cfe-commits
bkramer created this revision. bkramer added reviewers: klimek, hokein, ioeric. bkramer added a subscriber: cfe-commits. Herald added a subscriber: mgorny. - Refactor the external sema source into a visible class - Add support for emitting FixIts - Wrap up include fixer as a plugin as I did with c