[clang] [clang][Lex] Replace push_back with emplace_back for vector insertions (PR #232260)

Hardik Kumar via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 22 08:51:30 PDT 2026


================
@@ -2301,8 +2301,8 @@ void ModuleMapLoader::handleUseDecl(const modulemap::UseDecl &UD) {
 }
 
 void ModuleMapLoader::handleLinkDecl(const modulemap::LinkDecl &LD) {
-  ActiveModule->LinkLibraries.push_back(
-      Module::LinkLibrary(std::string{LD.Library}, LD.Framework));
+  ActiveModule->LinkLibraries.emplace_back(std::string{LD.Library},
+                                           LD.Framework);
----------------
hardikxk wrote:

Not really simply missed it before as I got diverted with the previous constructor changes. Thanks for the review!! I've replaced it in the latest commit.

https://github.com/llvm/llvm-project/pull/232260


More information about the cfe-commits mailing list