[llvm] r285990 - Add a missing return to the move assignment operator for

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 00:16:33 PDT 2016


Author: chandlerc
Date: Fri Nov  4 02:16:33 2016
New Revision: 285990

URL: http://llvm.org/viewvc/llvm-project?rev=285990&view=rev
Log:
Add a missing return to the move assignment operator for
SequenceNumberManager.

Sadly, we don't have any unittests for this class because it is
a private class. Since it seems to have a nice isolated and testable
interface, it'd be great to extract it to a detail namespace and write
unit tests for it as then we could catch issues. I'll probably pester
Lang about that or some alternative refactoring.

This was noticed by PVS-Studio.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h?rev=285990&r1=285989&r2=285990&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h Fri Nov  4 02:16:33 2016
@@ -700,6 +700,7 @@ private:
     SequenceNumberManager &operator=(SequenceNumberManager &&Other) {
       NextSequenceNumber = std::move(Other.NextSequenceNumber);
       FreeSequenceNumbers = std::move(Other.FreeSequenceNumbers);
+      return *this;
     }
 
     void reset() {




More information about the llvm-commits mailing list