Re: [Diffusion] rL248367: clang-format: Add initial #include sorting capabilities.

2015-09-23 Thread Daniel Jasper via cfe-commits
Thank you. I think I have fixed the issue in r248375. On Wed, Sep 23, 2015 at 12:25 PM, NAKAMURA Takumi wrote: > chapuni added subscribers: cfe-commits, chapuni. > > /cfe/trunk/lib/Tooling/Core/Replacement.cpp:408 FirstI may be in the end() > when SecondI != end(). Then FirstI->getOffset() is in

Re: [Diffusion] rL248367: clang-format: Add initial #include sorting capabilities.

2015-09-23 Thread NAKAMURA Takumi via cfe-commits
chapuni added subscribers: cfe-commits, chapuni. /cfe/trunk/lib/Tooling/Core/Replacement.cpp:408 FirstI may be in the end() when SecondI != end(). Then FirstI->getOffset() is invalid. I suggest to split the loop into - FirstI != First.end() && SecondI != Second.end(); - Tail-merge (either is