[llvm] r216360 - Support/Path: remove raw delete

Chandler Carruth chandlerc at google.com
Mon Aug 25 09:36:03 PDT 2014

On Mon, Aug 25, 2014 at 9:22 AM, David Blaikie <dblaikie at gmail.com> wrote:

> > -  char *Buf = new char[BufSize];
> > +  std::vector<char> Buffer(BufSize);
> > +  char *Buf = Buffer.data();
> I'd skip the intermediate variable and just pass "Buffer.data()" in
> the two callsites. It avoids an extra layer of indirection a developer
> would have to look through while following this code.
> (but opinions may differ here)

Please back this change out.

This is a really significant semantic change: you're forcing the
initialization of the entire buffer!

You need to get these patches pre-commit reviewed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140825/0a3b0102/attachment.html>

More information about the llvm-commits mailing list