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

Aleksandr Platonov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 19 00:40:17 PST 2021


ArcsinX created this revision.
Herald added subscribers: usaxena95, kadircet, arphaman.
ArcsinX requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

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 was masked by an incorrect file list in the preamble index: the preamble file list consists of files URI's and all other indexes file lists consist of file paths.
This patch introduces the index data kind (kind of data inside the index), which makes indexes merge more flexible and solves the problem described above.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94952

Files:
  clang-tools-extra/clangd/index/BackgroundRebuild.cpp
  clang-tools-extra/clangd/index/FileIndex.cpp
  clang-tools-extra/clangd/index/FileIndex.h
  clang-tools-extra/clangd/index/Index.cpp
  clang-tools-extra/clangd/index/Index.h
  clang-tools-extra/clangd/index/MemIndex.cpp
  clang-tools-extra/clangd/index/MemIndex.h
  clang-tools-extra/clangd/index/Merge.cpp
  clang-tools-extra/clangd/index/Merge.h
  clang-tools-extra/clangd/index/ProjectAware.cpp
  clang-tools-extra/clangd/index/dex/Dex.cpp
  clang-tools-extra/clangd/index/dex/Dex.h
  clang-tools-extra/clangd/index/remote/Client.cpp
  clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
  clang-tools-extra/clangd/unittests/DexTests.cpp
  clang-tools-extra/clangd/unittests/FileIndexTests.cpp
  clang-tools-extra/clangd/unittests/IndexTests.cpp
  clang-tools-extra/clangd/unittests/RenameTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94952.317474.patch
Type: text/x-patch
Size: 25416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210119/2a5b9431/attachment-0001.bin>


More information about the cfe-commits mailing list