[Patch] Make llvm::Regex non-copyable

dblaikie at gmail.com dblaikie at gmail.com
Wed Jan 1 11:15:14 PST 2014


Some unit testing of the move ctor might be nice

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.
On Tue Dec 31 2013 at 9:27:10 AM, Maciej Piechotka <uzytkownik2 at gmail.com>
wrote:

> The current implementation of llvm::Regex does not support copy
> construction of it's values. However it is not enforced so copying
> llvm::Regex leads to crash (well - technically undefined behaviour as
> free'd memory is accessed and then freed once again).
>
> Attached patch makes llvm::Regex non-copyable but adds the move
> constructor for C++11.
>
> Best regards
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140101/274c052b/attachment.html>


More information about the llvm-commits mailing list