Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Manuel Klimek via cfe-commits
klimek added inline comments. Comment at: cfe/trunk/lib/Tooling/Core/Replacement.cpp:169 @@ +168,3 @@ + // starts after R is (I+1). + if (I != Replaces.end() && *I == R) +++I; ioeric wrote: > I think we should ignore replacement text when checking equality b

Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Eric Liu via cfe-commits
ioeric added inline comments. Comment at: cfe/trunk/lib/Tooling/Core/Replacement.cpp:169 @@ +168,3 @@ + // starts after R is (I+1). + if (I != Replaces.end() && *I == R) +++I; I think we should ignore replacement text when checking equality between `*I` and

Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Manuel Klimek via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL277597: Fix quadratic runtime when adding items to tooling::Replacements. (authored by klimek). Changed prior to commit: https://reviews.llvm.org/D23119?vs=1&id=3#toc Repository: rL LLVM htt

Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Adrian Kuegel via cfe-commits
akuegel added a subscriber: akuegel. akuegel added a comment. lg Comment at: lib/Tooling/Core/Replacement.cpp:163 @@ +162,3 @@ + // Find the first entry that starts after the end of R. + // We cannot use upper_bound for that, as there might an element equal to + // AtEnd in R

Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Manuel Klimek via cfe-commits
klimek updated this revision to Diff 1. klimek added a comment. Fix bugs around marker replacements that neither insert nor delete anything. https://reviews.llvm.org/D23119 Files: lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/Refactorin

Re: [PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Manuel Klimek via cfe-commits
klimek updated this revision to Diff 66651. klimek added a comment. Remove re-implementation of overlaps check. https://reviews.llvm.org/D23119 Files: lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/RefactoringTest.cpp ===

[PATCH] D23119: Fix quadratic runtime when adding items to tooling::Replacements.

2016-08-03 Thread Manuel Klimek via cfe-commits
klimek created this revision. klimek added reviewers: djasper, bkramer, ioeric. klimek added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D23119 Files: lib/Tooling/Core/Replacement.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/Re