[patch] Fix pr23650
Aaron Ballman
aaron at aaronballman.com
Tue Jul 7 13:24:41 PDT 2015
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
>
More information about the llvm-commits
mailing list