Skip to content

Commit b47dac6

Browse files
committed
[flang][OpenMP] Remove pessimizing move introduced in 90f45a1
This unbreaks the builders that diagnose this situation: error: moving a temporary object prevents copy elision [-Werror,-Wpess imizing-move] 341 | static OmpClauseList empty{std::move(decltype(OmpClauseList: :v){})}; | ^
1 parent 40ee5a0 commit b47dac6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Parser/parse-tree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ llvm::omp::Clause OmpClause::Id() const {
338338
}
339339

340340
const OmpClauseList &OmpDirectiveSpecification::Clauses() const {
341-
static OmpClauseList empty{std::move(decltype(OmpClauseList::v){})};
341+
static OmpClauseList empty{decltype(OmpClauseList::v){}};
342342
if (auto &clauses = std::get<std::optional<OmpClauseList>>(t)) {
343343
return *clauses;
344344
}

0 commit comments

Comments
 (0)