[clang] [clang] MangledSymbol: Added move to Names param in init list (PR #87287)

Braden Helmer via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 15:13:40 PDT 2024


https://github.com/bradenhelmer created https://github.com/llvm/llvm-project/pull/87287

Fixes #87255

>From 4d0290b2dc10705cf229e4c1c3b40dd5155ea61c Mon Sep 17 00:00:00 2001
From: Braden Helmer <bradenhelmeraus at gmail.com>
Date: Mon, 1 Apr 2024 18:09:59 -0400
Subject: [PATCH] Added move for Names parameter in MangledSymbol ctor

---
 clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
index d58f5bb0919906..81a827dba26b90 100644
--- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -33,7 +33,8 @@ class InterfaceStubFunctionsConsumer : public ASTConsumer {
 
     MangledSymbol(const std::string &ParentName, uint8_t Type, uint8_t Binding,
                   std::vector<std::string> Names)
-        : ParentName(ParentName), Type(Type), Binding(Binding), Names(Names) {}
+        : ParentName(ParentName), Type(Type), Binding(Binding),
+          Names(std::move(Names)) {}
   };
   using MangledSymbols = std::map<const NamedDecl *, MangledSymbol>;
 



More information about the cfe-commits mailing list