[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 16:47:42 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-tools-extra
Author: Nathan Ridge (HighCommander4)
<details>
<summary>Changes</summary>
This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe what those cases are.
---
Full diff: https://github.com/llvm/llvm-project/pull/118906.diff
1 Files Affected:
- (modified) clang-tools-extra/clangd/index/dex/Dex.h (+2)
``````````diff
diff --git a/clang-tools-extra/clangd/index/dex/Dex.h b/clang-tools-extra/clangd/index/dex/Dex.h
index 69e161d51135b6..8ae4050d004e28 100644
--- a/clang-tools-extra/clangd/index/dex/Dex.h
+++ b/clang-tools-extra/clangd/index/dex/Dex.h
@@ -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.
llvm::StringSet<> Files;
// Contents of the index (symbols, references, etc.)
IndexContents IdxContents;
``````````
</details>
https://github.com/llvm/llvm-project/pull/118906
More information about the cfe-commits
mailing list