[lldb] [Host/SerialPort] Add std::moves for better compatibility
authorMichał Górny <mgorny@moritz.systems>
Thu, 21 Oct 2021 09:08:05 +0000 (11:08 +0200)
committerMichał Górny <mgorny@moritz.systems>
Thu, 21 Oct 2021 09:08:05 +0000 (11:08 +0200)
lldb/source/Host/common/File.cpp

index 6854353..1c8a0ab 100644 (file)
@@ -821,20 +821,20 @@ SerialPort::Create(int fd, OpenOptions options, Options serial_options,
 
   Terminal term{fd};
   if (llvm::Error error = term.SetRaw())
-    return error;
+    return std::move(error);
   if (serial_options.BaudRate) {
     if (llvm::Error error =
             term.SetBaudRate(serial_options.BaudRate.getValue()))
-      return error;
+      return std::move(error);
   }
   if (serial_options.Parity) {
     if (llvm::Error error = term.SetParity(serial_options.Parity.getValue()))
-      return error;
+      return std::move(error);
   }
   if (serial_options.StopBits) {
     if (llvm::Error error =
             term.SetStopBits(serial_options.StopBits.getValue()))
-      return error;
+      return std::move(error);
   }
 
   return out;