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.
this bool seems complicated enough & duplicated that you could consider pulling out
static bool indexIsAuthoritative(const SymbolIndex::IndexedFiles&, const Symbol &S);
(The IndexedFiles typedef doesn't exist, but it should!)