[CLANGD] [NFC] Fix proposed by static analyzer. (#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.
This commit is contained in:
parent
25c4478f38
commit
38e0f983ad
@ -79,7 +79,8 @@ SlabTuple indexSymbols(ASTContext &AST, Preprocessor &PP,
|
|||||||
|
|
||||||
SymbolCollector Collector(std::move(CollectorOpts));
|
SymbolCollector Collector(std::move(CollectorOpts));
|
||||||
Collector.setPreprocessor(PP);
|
Collector.setPreprocessor(PP);
|
||||||
index::indexTopLevelDecls(AST, PP, DeclsToIndex, Collector, IndexOpts);
|
index::indexTopLevelDecls(AST, PP, DeclsToIndex, Collector,
|
||||||
|
std::move(IndexOpts));
|
||||||
if (MacroRefsToIndex)
|
if (MacroRefsToIndex)
|
||||||
Collector.handleMacros(*MacroRefsToIndex);
|
Collector.handleMacros(*MacroRefsToIndex);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user