diff options
Diffstat (limited to 'clang-tools-extra/clangd/index/FileIndex.cpp')
-rw-r--r-- | clang-tools-extra/clangd/index/FileIndex.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp index bc102d29de9..37fd031e09f 100644 --- a/clang-tools-extra/clangd/index/FileIndex.cpp +++ b/clang-tools-extra/clangd/index/FileIndex.cpp @@ -45,9 +45,13 @@ indexSymbols(ASTContext &AST, std::shared_ptr<Preprocessor> PP, if (IsIndexMainAST) { // We only collect refs when indexing main AST. CollectorOpts.RefFilter = RefKind::All; + // Comments for main file can always be obtained from sema, do not store + // them in the index. + CollectorOpts.StoreAllDocumentation = false; } else { IndexOpts.IndexMacrosInPreprocessor = true; CollectorOpts.CollectMacro = true; + CollectorOpts.StoreAllDocumentation = true; } SymbolCollector Collector(std::move(CollectorOpts)); |