This is an archive of the discontinued LLVM Phabricator instance.

[clangd] NFC: Document URIDistance
ClosedPublic

Authored by kbobyrev on Sep 5 2018, 10:22 AM.

Details

Summary

URIDistance constructor should mention that Sources must contain *absolute paths*, not URIs. This is not very clear when looking at the interface, especially given that distance(...) accepts URI, not an absolute path which can give the wrong impression.

Diff Detail

Event Timeline

kbobyrev created this revision.Sep 5 2018, 10:22 AM
sammccall accepted this revision.Sep 5 2018, 12:53 PM
sammccall added inline comments.
clang-tools-extra/clangd/FileDistance.h
66 ↗(On Diff #164066)
89 ↗(On Diff #164066)

The constructor doesn't do any computation, thus there's nothing to memoize.

I'd suggest dropping the second sentence here, that's the only noteworthy thing specific to this constructor.

This revision is now accepted and ready to land.Sep 5 2018, 12:53 PM
kbobyrev updated this revision to Diff 164197.Sep 6 2018, 6:05 AM
kbobyrev marked an inline comment as done.
kbobyrev added inline comments.
clang-tools-extra/clangd/FileDistance.h
89 ↗(On Diff #164066)

Sorry, did you mean dropping the *first sentence* here? The second one seems to be the one you describe.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.