[all-commits] [llvm/llvm-project] 6d2fb3: [clangd] Perform merging for stale symbols in Merg...

kadir çetinkaya via All-commits all-commits at lists.llvm.org
Tue Mar 30 02:10:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d2fb3cefba618be0326bb3da85d7568a72fefc4
      https://github.com/llvm/llvm-project/commit/6d2fb3cefba618be0326bb3da85d7568a72fefc4
  Author: Kadir Cetinkaya <kadircet at google.com>
  Date:   2021-03-30 (Tue, 30 Mar 2021)

  Changed paths:
    M clang-tools-extra/clangd/index/Index.h
    M clang-tools-extra/clangd/index/Merge.cpp
    M clang-tools-extra/clangd/unittests/IndexTests.cpp

  Log Message:
  -----------
  [clangd] Perform merging for stale symbols in MergeIndex

Clangd drops symbols from static index whenever the dynamic index is
authoritative for the file. This results in regressions when static and
dynamic index contains different set of information, e.g.
IncludeHeaders.

After this patch, we'll choose to merge symbols from static index with
dynamic one rather than just dropping. This implies correctness problems
when the definition/documentation of the symbol is deleted. But seems
like it is worth having in more cases.

We still drop symbols if dynamic index owns the file and didn't report
the symbol, which means symbol is deleted.

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




More information about the All-commits mailing list