From: Aaron Ballman Date: Thu, 17 Apr 2014 12:50:54 +0000 (+0000) Subject: Preventing future MSVC 2012 surprises with SimpleArray by giving it an explicit move... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49e8a63c7a7fc5d066e67a2e8b4702466acb0219;p=clang Preventing future MSVC 2012 surprises with SimpleArray by giving it an explicit move assignment operator. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206460 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/Analyses/ThreadSafetyUtil.h b/include/clang/Analysis/Analyses/ThreadSafetyUtil.h index c8e670b98d..4ca49dfbd9 100644 --- a/include/clang/Analysis/Analyses/ThreadSafetyUtil.h +++ b/include/clang/Analysis/Analyses/ThreadSafetyUtil.h @@ -88,6 +88,18 @@ public: A.Capacity = 0; } + SimpleArray &operator=(SimpleArray &&RHS) { + if (this != &RHS) { + Data = RHS.Data; + Size = RHS.Size; + Capacity = RHS.Capacity; + + RHS.Data = nullptr; + RHS.Size = RHS.Capacity = 0; + } + return *this; + } + T *resize(size_t Ncp, MemRegionRef A) { T *Odata = Data; Data = A.allocateT(Ncp);