[pushed:,r15-4806] diagnostics: use std::move in output_factory::handler ctor

Message ID 20241031163455.2360891-1-dmalcolm@redhat.com
State Committed
Commit a91569d47d68cfe2b53b97b743c8b936d58b1658
Headers
Series [pushed:,r15-4806] diagnostics: use std::move in output_factory::handler ctor |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

David Malcolm Oct. 31, 2024, 4:34 p.m. UTC
  Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r15-4806-ga91569d47d68cf.

gcc/ChangeLog:
	* opts-diagnostic.cc (output_factory::handler::handler): Use
	std::move on name.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 gcc/opts-diagnostic.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gcc/opts-diagnostic.cc b/gcc/opts-diagnostic.cc
index 8dd4234ab0f4..97ff5777ef0a 100644
--- a/gcc/opts-diagnostic.cc
+++ b/gcc/opts-diagnostic.cc
@@ -107,7 +107,7 @@  public:
   class handler
   {
   public:
-    handler (std::string name) : m_name (name) {}
+    handler (std::string name) : m_name (std::move (name)) {}
     virtual ~handler () {}
 
     const std::string &get_name () const { return m_name; }