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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 12:20:26 PST 2016


Surprised we weren't getting a -Wreturn-type warning for this?

On Fri, Nov 4, 2016 at 12:26 AM Chandler Carruth via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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() {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/cfa33adb/attachment.html>


More information about the llvm-commits mailing list