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 no-op, but I don't know if llvm_regfree is a safe no-op when the parameter is null.<br><div>On Tue Dec 31 2013 at 9:27:10 AM, 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">The current implementation of llvm::Regex does not support copy<br>
construction of it's values. However it is not enforced so copying<br>
llvm::Regex leads to crash (well - technically undefined 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 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>
</blockquote>