[all-commits] [llvm/llvm-project] 91698f: [clangd] Take into account what is in the index (s...

Aleksandr Platonov via All-commits all-commits at lists.llvm.org
Fri Feb 5 02:38:12 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91698fe45f6068c5a6f8284e5e8e19a8d89dfea8
      https://github.com/llvm/llvm-project/commit/91698fe45f6068c5a6f8284e5e8e19a8d89dfea8
  Author: Aleksandr Platonov <platonov.aleksandr at huawei.com>
  Date:   2021-02-05 (Fri, 05 Feb 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/FileIndex.h
    M clang-tools-extra/clangd/index/Index.cpp
    M clang-tools-extra/clangd/index/Index.h
    M clang-tools-extra/clangd/index/MemIndex.cpp
    M clang-tools-extra/clangd/index/MemIndex.h
    M clang-tools-extra/clangd/index/Merge.cpp
    M clang-tools-extra/clangd/index/Merge.h
    M clang-tools-extra/clangd/index/ProjectAware.cpp
    M clang-tools-extra/clangd/index/dex/Dex.cpp
    M clang-tools-extra/clangd/index/dex/Dex.h
    M clang-tools-extra/clangd/index/remote/Client.cpp
    M clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
    M clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
    M clang-tools-extra/clangd/unittests/DexTests.cpp
    M clang-tools-extra/clangd/unittests/FileIndexTests.cpp
    M clang-tools-extra/clangd/unittests/IndexTests.cpp
    M clang-tools-extra/clangd/unittests/RenameTests.cpp

  Log Message:
  -----------
  [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

Current indexes merge logic skip data from the static index if the file is in the dynamic index, but sometimes the dynamic index does not contain references (e.g. preamble (dynamic) index vs background (static) index).
This problem is masked with the fact, that the preamble index file list consists of file URI's and other indexes file lists consist of file paths.
This patch introduces the index contents (symbols, references, etc.), which makes indexes merge more flexible and makes it able to use URI's for the index file list.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D94952




More information about the All-commits mailing list