diff options
author | Kirill Bobyrev <kbobyrev.opensource@gmail.com> | 2018-09-07 09:18:58 +0000 |
---|---|---|
committer | Kirill Bobyrev <kbobyrev.opensource@gmail.com> | 2018-09-07 09:18:58 +0000 |
commit | e5536b972f053d8c30a444e429e2dd39505aa37c (patch) | |
tree | 002268c5c738f1c07d77bf6498c6ada8c3284e76 | |
parent | f1510528ddc7c6c9a21b16f69e53d033624ec0ab (diff) | |
download | bcm5719-llvm-e5536b972f053d8c30a444e429e2dd39505aa37c.tar.gz bcm5719-llvm-e5536b972f053d8c30a444e429e2dd39505aa37c.zip |
[clangd] NFC: Document URIDistance
`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.
Reviewed By: sammccall
Differential Revision: https://reviews.llvm.org/D51691
llvm-svn: 341639
-rw-r--r-- | clang-tools-extra/clangd/FileDistance.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/FileDistance.h b/clang-tools-extra/clangd/FileDistance.h index f85e8ed76ae..f30f1aae8d5 100644 --- a/clang-tools-extra/clangd/FileDistance.h +++ b/clang-tools-extra/clangd/FileDistance.h @@ -89,6 +89,7 @@ private: // comparison on the bodies. class URIDistance { public: + // \p Sources must contain absolute paths, not URIs. URIDistance(llvm::StringMap<SourceParams> Sources, const FileDistanceOptions &Opts = {}) : Sources(Sources), Opts(Opts) {} |