This is an archive of the discontinued LLVM Phabricator instance.

[clang-move] Move comments which are associated with the moved class.
ClosedPublic

Authored by hokein on Oct 4 2016, 1:18 AM.

Event Timeline

hokein updated this revision to Diff 73422.Oct 4 2016, 1:18 AM
hokein retitled this revision from to [clang-move] Move comments which are associated with the moved class..
hokein updated this object.
hokein added a reviewer: ioeric.
hokein added a subscriber: cfe-commits.
ioeric edited edge metadata.Oct 4 2016, 3:55 AM

This is great!

clang-move/ClangMove.cpp
70–74

Maybe:

return (SM->getLocForEndOfFile(LocInfo.first) == EndLoc) ? EndLoc : EndLoc.getLocWithOffset(1);
343

Looks like GetFullRange is called twice on the same Decl: one for creating insertion replacement and one for deletion replacement. This seems to be a duplicate.

hokein updated this revision to Diff 73463.Oct 4 2016, 5:26 AM
hokein marked an inline comment as done.
hokein edited edge metadata.

Address review comments.

clang-move/ClangMove.cpp
343

Good point. Yeah, currently the GetFullRange is called twice. Have added a FIXME.

ioeric accepted this revision.Oct 6 2016, 1:11 AM
ioeric edited edge metadata.

lg

This revision is now accepted and ready to land.Oct 6 2016, 1:11 AM
This revision was automatically updated to reflect the committed changes.