forked from OSchip/llvm-project
[flang] Fix a warning
This patch fixes: llvm-project/flang/lib/Semantics/expression.cpp:405:12: error: moving a local object in a return statement prevents copy elision [-Werror,-Wpessimizing-move]
This commit is contained in:
parent
15e9b1d0c0
commit
7aa77c5a67
|
@ -402,7 +402,7 @@ MaybeExpr ExpressionAnalyzer::FixMisparsedSubstring(
|
|||
MaybeExpr ExpressionAnalyzer::Analyze(const parser::Designator &d) {
|
||||
auto restorer{GetContextualMessages().SetLocation(d.source)};
|
||||
if (auto substringInquiry{FixMisparsedSubstring(d)}) {
|
||||
return std::move(substringInquiry);
|
||||
return substringInquiry;
|
||||
}
|
||||
// These checks have to be deferred to these "top level" data-refs where
|
||||
// we can be sure that there are no following subscripts (yet).
|
||||
|
|
Loading…
Reference in New Issue