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
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
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
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
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
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
===
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