Skip to content

Commit

Permalink
[Concepts] Fix incorrect move out of temporary in D41910
Browse files Browse the repository at this point in the history
Moves out of temporaries caused warnings that failed builds.
  • Loading branch information
saarraz committed Dec 18, 2019
1 parent 8adae60 commit 11d5fa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Sema/SemaConcept.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ static NormalForm makeCNF(const NormalizedConstraint &Normalized) {
if (Normalized.getCompoundKind() == NormalizedConstraint::CCK_Conjunction) {
LCNF.reserve(LCNF.size() + RCNF.size());
while (!RCNF.empty())
LCNF.push_back(std::move(RCNF.pop_back_val()));
LCNF.push_back(RCNF.pop_back_val());
return LCNF;
}

Expand Down Expand Up @@ -682,7 +682,7 @@ static NormalForm makeDNF(const NormalizedConstraint &Normalized) {
if (Normalized.getCompoundKind() == NormalizedConstraint::CCK_Disjunction) {
LDNF.reserve(LDNF.size() + RDNF.size());
while (!RDNF.empty())
LDNF.push_back(std::move(RDNF.pop_back_val()));
LDNF.push_back(RDNF.pop_back_val());
return LDNF;
}

Expand Down

0 comments on commit 11d5fa6

Please sign in to comment.