<div dir="ltr">If D31546 is neutral to you, I'll submit that change as I sort of like it. It uses common toString() instead of some member variable, so it feels more readable than it currently is.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 31, 2017 at 1:54 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't see the advantage. It still has two variable and ore more<br>
member variable than what is needed.<br>
<br>
It is not a big deal and something we can try to refactor later on.<br>
<br>
Cheers,<br>
Rafael<br>
<div class="HOEnZb"><div class="h5"><br>
On 31 March 2017 at 15:19, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
> Okay. How about this one. <a href="https://reviews.llvm.org/D31546" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D31546</a><br>
><br>
> On Fri, Mar 31, 2017 at 5:56 AM, Rafael Espíndola<br>
> <<a href="mailto:rafael.espindola@gmail.com">rafael.espindola@gmail.com</a>> wrote:<br>
>><br>
>> On 30 March 2017 at 18:56, Rui Ueyama <<a href="mailto:ruiu@google.com">ruiu@google.com</a>> wrote:<br>
>> > I tried a few different ideas. First, I tried to pass an InputFile to<br>
>> > check() as you suggested, but that ended up having four functions, which<br>
>> > looked ugly<br>
>> ><br>
>> >   template <class T> T check(ErrorOr<T> E, const Twine &Prefix);<br>
>> >   template <class T> T check(Expected<T> E, const Twine &Prefix);<br>
>> >   template <class T> T check(ErrorOr<T> E, InputFile *File);<br>
>> >   template <class T> T check(Expected<T> E, InputFile *File);<br>
>><br>
>> I would still prefer this as it makes it impossible to get the two<br>
>> variables out of sync (and avoids a member variable).<br>
>><br>
>> Cheers,<br>
>> Rafael<br>
><br>
><br>
</div></div></blockquote></div><br></div>