[patch] Fix pr23650
Filipe Cabecinhas
filcab at gmail.com
Tue Jul 7 13:48:46 PDT 2015
Yeah, that's true. I guess I just got caught by the mismatch between title
and code.
It's really not a problem.
Filipe
On Tue, Jul 7, 2015 at 1:24 PM, Aaron Ballman <aaron at aaronballman.com>
wrote:
> On Tue, Jul 7, 2015 at 3:20 PM, Filipe Cabecinhas <filcab at gmail.com>
> wrote:
> > Then why are you testing the size and not Str.Data()?
> >
> > The semantic check should be for the nullptr.
>
> Calling .Data() is superfluous, I think. If you have a size that is
> nonzero, the pointer had better not be nullptr or else other
> invariants are broken, I would guess.
>
> ~Aaron
>
> >
> > Thanks,
> >
> > Filipe
> >
> >
> > On Tuesday, July 7, 2015, Rafael EspĂndola <rafael.espindola at gmail.com>
> > wrote:
> >>
> >> Passing a null pointer to memcpy is undefined behavior.
> >>
> >>
> >> Cheers,
> >> Rafael
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>
> >
> >
> > --
> > F
> >
> >
> > _______________________________________________
> > 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/20150707/f66f7714/attachment.html>
More information about the llvm-commits
mailing list