This is an archive of the discontinued LLVM Phabricator instance.

[clang-diff] Fix similarity computation
ClosedPublic

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

Details

Summary

Add separate tests for the top-down and the bottom-up phase, as well as
one for the optimal matching.

Diff Detail

Repository
rL LLVM

Event Timeline

johannes created this revision.Aug 1 2017, 1:56 PM
johannes updated this revision to Diff 109308.Aug 2 2017, 2:58 AM

parent changed

klimek added inline comments.Aug 2 2017, 3:45 AM
test/Tooling/clang-diff-bottomup.cpp
3 ↗(On Diff #109308)

Instead of using -no-compilation-database most tools support adding -- (args) for using a fixed compilation database. Any specific reason to deviate from that for clang-diff?

johannes updated this revision to Diff 109424.Aug 2 2017, 1:42 PM

add test for Options.MaxSize

johannes added inline comments.Aug 2 2017, 2:05 PM
test/Tooling/clang-diff-bottomup.cpp
3 ↗(On Diff #109308)

ah I actually wasn't aware of that, done

johannes updated this revision to Diff 109505.Aug 3 2017, 2:42 AM

merge parent changes

arphaman added inline comments.Aug 10 2017, 10:39 AM
tools/clang-diff/ClangDiff.cpp
436 ↗(On Diff #109505)

Add a newline to the string as well.

johannes updated this revision to Diff 110688.Aug 11 2017, 4:38 AM

newline in error message

arphaman accepted this revision.Aug 14 2017, 6:05 AM

LGTM.

lib/Tooling/ASTDiff/ASTDiff.cpp
738 ↗(On Diff #110688)

Can denominator even be negative here? If no, please assert correspondingly.

This revision is now accepted and ready to land.Aug 14 2017, 6:05 AM
johannes updated this revision to Diff 110951.Aug 14 2017, 6:25 AM

comment getJaccardSimilarity

This revision was automatically updated to reflect the committed changes.