[llvm] r285442 - [APFloat] Use std::move() in move assignment operator

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 13:13:07 PDT 2016


Author: timshen
Date: Fri Oct 28 15:13:06 2016
New Revision: 285442

URL: http://llvm.org/viewvc/llvm-project?rev=285442&view=rev
Log:
[APFloat] Use std::move() in move assignment operator

Modified:
    llvm/trunk/include/llvm/ADT/APFloat.h

Modified: llvm/trunk/include/llvm/ADT/APFloat.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=285442&r1=285441&r2=285442&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APFloat.h (original)
+++ llvm/trunk/include/llvm/ADT/APFloat.h Fri Oct 28 15:13:06 2016
@@ -712,7 +712,7 @@ class APFloat : public APFloatBase {
         Double = std::move(RHS.Double);
       } else if (this != &RHS) {
         this->~Storage();
-        new (this) Storage(RHS);
+        new (this) Storage(std::move(RHS));
       }
       return *this;
     }




More information about the llvm-commits mailing list