https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/140116
This fixes an issue reported by the sanitizer with the following error message: `copy_constructor_call: IndexOpts` is passed by value as a parameter to` clang::index::IndexingOptions::IndexingOptions` instead of being moved. >From 5482b1859fcc98358ebea0ccab69c5553d7db307 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat <zahira.ammarguel...@intel.com> Date: Thu, 15 May 2025 11:16:48 -0700 Subject: [PATCH] [CLANGD] Fix proposed by sanitizer. --- clang-tools-extra/clangd/index/FileIndex.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/index/FileIndex.cpp b/clang-tools-extra/clangd/index/FileIndex.cpp index 0fe069783d64f..c49de377d54ca 100644 --- a/clang-tools-extra/clangd/index/FileIndex.cpp +++ b/clang-tools-extra/clangd/index/FileIndex.cpp @@ -79,7 +79,8 @@ SlabTuple indexSymbols(ASTContext &AST, Preprocessor &PP, SymbolCollector Collector(std::move(CollectorOpts)); Collector.setPreprocessor(PP); - index::indexTopLevelDecls(AST, PP, DeclsToIndex, Collector, IndexOpts); + index::indexTopLevelDecls(AST, PP, DeclsToIndex, Collector, + std::move(IndexOpts)); if (MacroRefsToIndex) Collector.handleMacros(*MacroRefsToIndex); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits