[clang-tools-extra] [clangd] Add clarifying comment about when Dex::IdxContents is populated (PR #118906)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 7 18:15:43 PST 2024
================
@@ -121,6 +121,8 @@ class Dex : public SymbolIndex {
llvm::DenseMap<std::pair<SymbolID, uint8_t>, std::vector<SymbolID>> Relations;
std::shared_ptr<void> KeepAlive; // poor man's move-only std::any
// Set of files which were used during this index build.
+ // Files and IdxContents are only populated for dynamic and background
+ // indexes, not static indexes.
----------------
HighCommander4 wrote:
That's a fair point.
My motivation with this patch is to avoid the sort of confusion I had when looking at https://github.com/llvm/llvm-project/pull/118324, where I was wondering if maybe the fact that some codepaths do not propagate a value for `IdxContents` is an oversight.
I revised the comment to avoid talking about the specifics of higher layers here, let me know if that looks better.
https://github.com/llvm/llvm-project/pull/118906
More information about the cfe-commits
mailing list