[all-commits] [llvm/llvm-project] c4efd0: [clangd] Use URIs instead of paths in the index fi...

Aleksandr Platonov via All-commits all-commits at lists.llvm.org
Fri Mar 5 23:48:18 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c4efd04f18c7e10c11de4a790f4d0c42f694d49b
      https://github.com/llvm/llvm-project/commit/c4efd04f18c7e10c11de4a790f4d0c42f694d49b
  Author: Aleksandr Platonov <platonov.aleksandr at huawei.com>
  Date:   2021-03-06 (Sat, 06 Mar 2021)

  Changed paths:
    M clang-tools-extra/clangd/index/Background.cpp
    M clang-tools-extra/clangd/index/FileIndex.cpp
    M clang-tools-extra/clangd/index/MemIndex.cpp
    M clang-tools-extra/clangd/index/dex/Dex.cpp
    M clang-tools-extra/clangd/test/memory_tree.test
    M clang-tools-extra/clangd/unittests/DexTests.cpp
    M clang-tools-extra/clangd/unittests/FileIndexTests.cpp
    M clang-tools-extra/clangd/unittests/IndexTests.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list