This is an archive of the discontinued LLVM Phabricator instance.

[clang-diff] Move printing of matches and changes to clang-diff
ClosedPublic

Authored by johannes on Aug 1 2017, 1:52 PM.

Details

Summary

This also changes the output order of the changes. Now the matches are
printed in pre-order, intertwined with insertions, updates, and moves.
Deletions are printed afterwards.

Event Timeline

johannes created this revision.Aug 1 2017, 1:52 PM
arphaman added inline comments.Aug 2 2017, 4:35 AM
lib/Tooling/ASTDiff/ASTDiff.cpp
177

It doesn't look like this function is used in this patch?

johannes updated this revision to Diff 109417.Aug 2 2017, 1:36 PM

remove unused SubtreeIterator

arphaman edited edge metadata.Aug 9 2017, 4:32 AM

Previous Move resulted in llvm_unreachable("TODO");, but now it seems to be fixed. The new output for Move and UpdateMove should be tested in a test.

johannes updated this revision to Diff 110552.Aug 10 2017, 4:16 AM

add test for 'Move' and 'Update and Move' in output

arphaman added inline comments.Aug 10 2017, 10:07 AM
include/clang/Tooling/ASTDiff/ASTDiff.h
40

Looks like Shift isn't initialized anywhere.

johannes updated this revision to Diff 110608.Aug 10 2017, 10:30 AM

initialize Node::Shift

arphaman accepted this revision.Aug 14 2017, 5:45 AM

LGTM, with one request below:

lib/Tooling/ASTDiff/ASTDiff.cpp
96–101

80 column violation, please re-format.

This revision is now accepted and ready to land.Aug 14 2017, 5:45 AM
This revision was automatically updated to reflect the committed changes.