Committed as r198334 with move assignment support as well. Thanks!<br><br><div>On Wed Jan 01 2014 at 4:38:26 PM, Maciej Piechotka <<a href="mailto:uzytkownik2@gmail.com">uzytkownik2@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Updated tests and brown bug fix to move constructor.<br>
<br>
On Wed, 2014-01-01 at 20:24 +0100, Maciej Piechotka wrote:<br>
> llvm_regfree is not a noop for the nullptr. I can move the check for<br>
> null there of course.<br>
><br>
> I'll update the patches with tests.<br>
><br>
> On Wed, 2014-01-01 at 19:15 +0000, <a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a> wrote:<br>
> > Some unit testing of the move ctor might be nice<br>
> ><br>
> > Also - do you need the conditional in the dtor? delete nullptr; is a<br>
> > no-op, but I don't know if llvm_regfree is a safe no-op when the<br>
> > parameter is null.<br>
> > On Tue Dec 31 2013 at 9:27:10 AM, Maciej Piechotka<br>
> > <<a href="mailto:uzytkownik2@gmail.com" target="_blank">uzytkownik2@gmail.com</a>> wrote:<br>
> >         The current implementation of llvm::Regex does not support<br>
> >         copy<br>
> >         construction of it's values. However it is not enforced so<br>
> >         copying<br>
> >         llvm::Regex leads to crash (well - technically undefined<br>
> >         behaviour as<br>
> >         free'd memory is accessed and then freed once again).<br>
> ><br>
> >         Attached patch makes llvm::Regex non-copyable but adds the<br>
> >         move<br>
> >         constructor for C++11.<br>
> ><br>
> >         Best regards<br>
> >         ______________________________<u></u>_________________<br>
> >         llvm-commits mailing list<br>
> >         <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
> >         <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvm-commits</a><br>
><br>
<br>
</blockquote>