[flang] Remove needless std::move() that breaks clang build
authorpeter klausler <pklausler@nvidia.com>
Fri, 3 Jan 2020 18:30:14 +0000 (10:30 -0800)
committerpeter klausler <pklausler@nvidia.com>
Fri, 3 Jan 2020 19:32:44 +0000 (11:32 -0800)
Add the std::move() to where it should have been

Original-commit: flang-compiler/f18@54fe9b39a1551313da06e5c40ca2aa523288292d
Reviewed-on: https://github.com/flang-compiler/f18/pull/903

flang/lib/semantics/semantics.cc

index 4ab1010..37af588 100644 (file)
@@ -209,7 +209,7 @@ void SemanticsContext::CheckDoVarRedefine(const parser::CharBlock &location,
     if (IsActiveDoVariable(*root)) {
       parser::CharBlock doLoc{GetDoVariableLocation(*root)};
       CHECK(doLoc != parser::CharBlock{});
-      Say(location, message, root->name())
+      Say(location, std::move(message), root->name())
           .Attach(doLoc, "Enclosing DO construct"_en_US);
     }
   }
@@ -217,14 +217,14 @@ void SemanticsContext::CheckDoVarRedefine(const parser::CharBlock &location,
 
 void SemanticsContext::WarnDoVarRedefine(
     const parser::CharBlock &location, const Symbol &variable) {
-  CheckDoVarRedefine(location, variable,
-      std::move("Possible redefinition of DO variable '%s'"_en_US));
+  CheckDoVarRedefine(
+      location, variable, "Possible redefinition of DO variable '%s'"_en_US);
 }
 
 void SemanticsContext::CheckDoVarRedefine(
     const parser::CharBlock &location, const Symbol &variable) {
-  CheckDoVarRedefine(location, variable,
-      std::move("Cannot redefine DO variable '%s'"_err_en_US));
+  CheckDoVarRedefine(
+      location, variable, "Cannot redefine DO variable '%s'"_err_en_US);
 }
 
 void SemanticsContext::CheckDoVarRedefine(const parser::Variable &variable) {