[clang] 11d5fa6 - [Concepts] Fix incorrect move out of temporary in D41910

Saar Raz via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 11:45:18 PST 2019


Author: Saar Raz
Date: 2019-12-18T21:43:53+02:00
New Revision: 11d5fa6e87e3584f72056ecc2b17f88c58323dde

URL: https://github.com/llvm/llvm-project/commit/11d5fa6e87e3584f72056ecc2b17f88c58323dde
DIFF: https://github.com/llvm/llvm-project/commit/11d5fa6e87e3584f72056ecc2b17f88c58323dde.diff

LOG: [Concepts] Fix incorrect move out of temporary in D41910

Moves out of temporaries caused warnings that failed builds.

Added: 
    

Modified: 
    clang/lib/Sema/SemaConcept.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaConcept.cpp b/clang/lib/Sema/SemaConcept.cpp
index f9d54a811469..63b8e06a7aef 100755
--- a/clang/lib/Sema/SemaConcept.cpp
+++ b/clang/lib/Sema/SemaConcept.cpp
@@ -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;
   }
 
@@ -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;
   }
 


        


More information about the cfe-commits mailing list