[flang-commits] [flang] fae11ab - [flang] Fix a warning
Kazu Hirata via flang-commits
flang-commits at lists.llvm.org
Wed Aug 23 09:20:21 PDT 2023
Author: Kazu Hirata
Date: 2023-08-23T09:20:12-07:00
New Revision: fae11ab208a7d9d43a95c300e64eee23d6735f5b
URL: https://github.com/llvm/llvm-project/commit/fae11ab208a7d9d43a95c300e64eee23d6735f5b
DIFF: https://github.com/llvm/llvm-project/commit/fae11ab208a7d9d43a95c300e64eee23d6735f5b.diff
LOG: [flang] Fix a warning
This patch fixes:
flang/lib/Semantics/resolve-directives.cpp:899:29: error: moving a
temporary object prevents copy elision [-Werror,-Wpessimizing-move]
Added:
Modified:
flang/lib/Semantics/resolve-directives.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp
index d758e6ad61139a..44c6804756c1f3 100644
--- a/flang/lib/Semantics/resolve-directives.cpp
+++ b/flang/lib/Semantics/resolve-directives.cpp
@@ -896,7 +896,7 @@ void AccAttributeVisitor::AddRoutineInfoToSymbol(
std::string str{std::get<std::string>(charConst->t)};
std::stringstream bindName;
bindName << "\"" << str << "\"";
- info.set_bindName(std::move(bindName.str()));
+ info.set_bindName(bindName.str());
}
}
}
More information about the flang-commits
mailing list