Skip to content

Commit

Permalink
[flang] Fix a warning
Browse files Browse the repository at this point in the history
This patch fixes:

  flang/lib/Semantics/resolve-directives.cpp:899:29: error: moving a
  temporary object prevents copy elision [-Werror,-Wpessimizing-move]
  • Loading branch information
kazutakahirata committed Aug 23, 2023
1 parent 1c3f7f1 commit fae11ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Semantics/resolve-directives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Expand Down

0 comments on commit fae11ab

Please sign in to comment.