From e4c32a4147012da735205eb44a45b8be5eea048d Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 12 Jun 2025 14:30:59 -0700 Subject: [PATCH] [Clang][NFC] Move Input into SmallVector instead of copy (#143830) Static analysis flagged Input as a large object that would benefit from being moved over being copied. --- clang/lib/Frontend/CompilerInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 587b0d1af9c8..09a66b652518 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1191,7 +1191,7 @@ std::unique_ptr CompilerInstance::cloneForModuleCompileImpl( FrontendOpts.OriginalModuleMap = std::string(OriginalModuleMapFile); // Force implicitly-built modules to hash the content of the module file. HSOpts.ModulesHashContent = true; - FrontendOpts.Inputs = {Input}; + FrontendOpts.Inputs = {std::move(Input)}; // Don't free the remapped file buffers; they are owned by our caller. PPOpts.RetainRemappedFileBuffers = true;