[Clang][ByteCode][NFC] Avoid copies by using move in Disasm.cpp (#146127)
Static analysis flagged some cases we could avoid copies by using
std::move in Disasm.cpp.
diff --git a/clang/lib/AST/ByteCode/Disasm.cpp b/clang/lib/AST/ByteCode/Disasm.cpp
index a3eecd0..f64501f 100644
--- a/clang/lib/AST/ByteCode/Disasm.cpp
+++ b/clang/lib/AST/ByteCode/Disasm.cpp
@@ -63,7 +63,7 @@
std::string S;
llvm::raw_string_ostream SS(S);
- SS << Result;
+ SS << std::move(Result);
return S;
}
@@ -81,7 +81,7 @@
std::string Str;
llvm::raw_string_ostream SS(Str);
- SS << Result;
+ SS << std::move(Result);
return Str;
}
@@ -99,7 +99,7 @@
std::string Str;
llvm::raw_string_ostream SS(Str);
- SS << Result;
+ SS << std::move(Result);
return Str;
}
@@ -109,7 +109,7 @@
std::string Result;
llvm::raw_string_ostream SS(Result);
- SS << F;
+ SS << std::move(F);
return Result;
}