I imagine we could just change this function to return Error and everything would just work.  I might try it if i get some cycles<br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 22, 2016 at 11:56 AM Mehdi AMINI <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">mehdi_amini added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: llvm/trunk/lib/Support/StringRef.cpp:384<br class="gmail_msg">
@@ -384,3 +383,3 @@<br class="gmail_msg">
   // Empty strings (after the radix autosense) are invalid.<br class="gmail_msg">
   if (Str.empty()) return true;<br class="gmail_msg">
<br class="gmail_msg">
----------------<br class="gmail_msg">
amccarth wrote:<br class="gmail_msg">
> `true` means invalid?!  Wow!  I did not see that coming.<br class="gmail_msg">
><br class="gmail_msg">
> I believe this check is unnecessary now, since this patch adds a check near the end to see if any characters were consumed.<br class="gmail_msg">
This is a widespread convention in LLVM APIs that returning "true" means an error occurred (and I'm always confused).<br class="gmail_msg">
<br class="gmail_msg">
The new Error class style settles this issue, we should just be more consistent on using it.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Repository:<br class="gmail_msg">
  rL LLVM<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D24778" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D24778</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>