[clang-tools-extra] [NFC] Use a move instead of a copy to optimize performance. (PR #118699)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 04:47:05 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clangd
@llvm/pr-subscribers-clang-tools-extra
Author: Zahira Ammarguellat (zahiraam)
<details>
<summary>Changes</summary>
This is an issue detected by a static analysis tool,
---
Full diff: https://github.com/llvm/llvm-project/pull/118699.diff
1 Files Affected:
- (modified) clang-tools-extra/clangd/ModulesBuilder.cpp (+1-1)
``````````diff
diff --git a/clang-tools-extra/clangd/ModulesBuilder.cpp b/clang-tools-extra/clangd/ModulesBuilder.cpp
index 29508901f85bba..bee31fe51555e0 100644
--- a/clang-tools-extra/clangd/ModulesBuilder.cpp
+++ b/clang-tools-extra/clangd/ModulesBuilder.cpp
@@ -199,7 +199,7 @@ bool IsModuleFileUpToDate(PathRef ModuleFilePath,
SourceManager SourceMgr(*Diags, FileMgr);
- HeaderSearch HeaderInfo(HSOpts, SourceMgr, *Diags, LangOpts,
+ HeaderSearch HeaderInfo(std::move(HSOpts), SourceMgr, *Diags, LangOpts,
/*Target=*/nullptr);
TrivialModuleLoader ModuleLoader;
``````````
</details>
https://github.com/llvm/llvm-project/pull/118699
More information about the cfe-commits
mailing list