[clangd] Use URIs instead of paths in the index file list
authorAleksandr Platonov <platonov.aleksandr@huawei.com>
Sat, 6 Mar 2021 07:44:05 +0000 (10:44 +0300)
committerAleksandr Platonov <platonov.aleksandr@huawei.com>
Sat, 6 Mar 2021 07:47:05 +0000 (10:47 +0300)
commitc4efd04f18c7e10c11de4a790f4d0c42f694d49b
treed1f776b6515d0c61064d5798108a3e4cd3342e0b
parent714644a36c3095e1dffeb2fb42da3876a5919d21
[clangd] Use URIs instead of paths in the index file list

Without this patch the file list of the preamble index contains URIs, but other indexes file lists contain file paths.
This makes `indexedFiles()` always returns `IndexContents::None` for the preamble index, because current implementation expects file paths inside the file list of the index.

This patch fixes this problem and also helps to avoid a lot of URI to path conversions during indexes merge.

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D97535
clang-tools-extra/clangd/index/Background.cpp
clang-tools-extra/clangd/index/FileIndex.cpp
clang-tools-extra/clangd/index/MemIndex.cpp
clang-tools-extra/clangd/index/dex/Dex.cpp
clang-tools-extra/clangd/test/memory_tree.test
clang-tools-extra/clangd/unittests/DexTests.cpp
clang-tools-extra/clangd/unittests/FileIndexTests.cpp
clang-tools-extra/clangd/unittests/IndexTests.cpp