[PATCH] D21423: Fix BitVector move ctor/assignment.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 17:57:24 PDT 2016
Test coverage?
On Wed, Jun 15, 2016 at 5:44 PM, Evgeniy Stepanov via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> eugenis created this revision.
> eugenis added a reviewer: pcc.
> eugenis added a subscriber: llvm-commits.
> eugenis set the repository for this revision to rL LLVM.
>
> Current implementation leaves the object in an invalid state.
>
> Repository:
> rL LLVM
>
> http://reviews.llvm.org/D21423
>
> Files:
> include/llvm/ADT/BitVector.h
>
> Index: include/llvm/ADT/BitVector.h
> ===================================================================
> --- include/llvm/ADT/BitVector.h
> +++ include/llvm/ADT/BitVector.h
> @@ -105,6 +105,7 @@
> BitVector(BitVector &&RHS)
> : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity) {
> RHS.Bits = nullptr;
> + RHS.Size = RHS.Capacity = 0;
> }
>
> ~BitVector() {
> @@ -454,6 +455,7 @@
> Capacity = RHS.Capacity;
>
> RHS.Bits = nullptr;
> + RHS.Size = RHS.Capacity = 0;
>
> return *this;
> }
>
>
>
> _______________________________________________
> 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/20160615/e6977185/attachment.html>
More information about the llvm-commits
mailing list