diff options
Diffstat (limited to 'clang-tools-extra/clangd/index/FileIndex.cpp')
| -rw-r--r-- | clang-tools-extra/clangd/index/FileIndex.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp index 1f3cc38d25b..43e8d322f4b 100644 --- a/clang-tools-extra/clangd/index/FileIndex.cpp +++ b/clang-tools-extra/clangd/index/FileIndex.cpp @@ -20,6 +20,8 @@ std::unique_ptr<SymbolSlab> indexAST(ASTContext &Ctx, std::shared_ptr<Preprocessor> PP, llvm::ArrayRef<const Decl *> Decls) { SymbolCollector::Options CollectorOpts; + // Code completion gets main-file results from Sema. + // But we leave this option on because features like go-to-definition want it. CollectorOpts.IndexMainFiles = true; auto Collector = std::make_shared<SymbolCollector>(std::move(CollectorOpts)); Collector->setPreprocessor(std::move(PP)); |

