This is an archive of the discontinued LLVM Phabricator instance.

[clang-move] Don't overuse Replacements::add.
ClosedPublic

Authored by hokein on Oct 14 2016, 6:25 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

hokein updated this revision to Diff 74672.Oct 14 2016, 6:25 AM
hokein retitled this revision from to [clang-move] Don't overuse Replacements::add..
hokein updated this object.
hokein added a reviewer: ioeric.
hokein added a subscriber: cfe-commits.
ioeric added inline comments.Oct 14 2016, 6:30 AM
clang-move/ClangMove.cpp
472 ↗(On Diff #74672)

For deletions, you can simply use add, which now simply merges overlapping deletions. And I think it should be considered an error if add fails. With add, you can get rid of addOrMergeReplacement.

hokein updated this revision to Diff 74675.Oct 14 2016, 6:41 AM

woohoo, delete more code!

hokein updated this revision to Diff 74677.Oct 14 2016, 6:42 AM

Delete one more function.

ioeric accepted this revision.Oct 14 2016, 6:43 AM
ioeric edited edge metadata.

Awesome! Lg with one nit.

clang-move/ClangMove.cpp
197 ↗(On Diff #74675)

This is also dead I think :P

This revision is now accepted and ready to land.Oct 14 2016, 6:43 AM
This revision was automatically updated to reflect the committed changes.
hokein marked an inline comment as done.