[PATCH] [Object, MachO] Make MachO parser significantly more robust to invalid inputs.

Alexey Samsonov vonosmas at gmail.com
Fri May 29 14:29:31 PDT 2015


On Fri, May 29, 2015 at 11:45 AM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
> On Thu, May 28, 2015 at 6:55 PM, Keno Fischer <
> kfischer at college.harvard.edu> wrote:
>
>> I don't really have a strong opinion either way, I just wanted to bring
>> it up as last time I touched this file a strong preference for moving
>> everything to ErrorOr was expressed in the review, because it's easy to
>> ignore the std::error_code.
>>
>
> *nod* I'll +1 this idea, but I haven't looked at these APIs to see how
> ingrained the options are. I also don't think there's a /huge/ cognitive
> overload to some inconsistency here, so I'd be willing to pay some
> inconsistency to move towards ErrorOr over error_code+out parameter.
>

Hm... I'm kind of worried about the boilerplate on the caller side: there
are dozens of calls of these methods in LLVM tools.
What do you think of using __attribute__((warn_unused_result)) instead?


>
>
>>
>>
>> http://reviews.llvm.org/D10111
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>


-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150529/6a2851aa/attachment.html>


More information about the llvm-commits mailing list