<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 9, 2014 at 10:50 AM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Wed, Apr 9, 2014 at 8:56 AM, David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:<br>

> Author: majnemer<br>
> Date: Wed Apr  9 02:56:27 2014<br>
> New Revision: 205839<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=205839&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=205839&view=rev</a><br>
> Log:<br>
> YAMLIO: Encode ambiguous hex strings explicitly<br>
><br>
> YAMLIO would turn a BinaryRef into the string 0000000004000000.<br>
> However, the leading zero causes parsers to interpret it as being an<br>
> octal number instead of a hexadecimal one.<br>
><br>
> Instead, escape such strings as needed.<br>
><br>
<br>
</div>This is wrong. In YAML all numbers are treated as decimal. Also this<br>
changes the tag type of the value to !!str.<br></blockquote><div><br></div><div>FWIW I expect BinaryRef output to be !!str; I would consider it a bug if that wasn't the case.</div><div><br></div><div>-- Sean Silva</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The correct change is to fix the reader to always do decimal and<br>
handle the 0x and 0o prefixes.<br>
<br>
See: <a href="http://www.yaml.org/spec/1.2/spec.html#id2805071" target="_blank">http://www.yaml.org/spec/1.2/spec.html#id2805071</a><br>
<span class="HOEnZb"><font color="#888888"><br>
- Michael Spencer<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>