<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, all. When Chris first put in SMRange, he made it a closed range, meaning that [X, X] was a range that includes X rather than an empty range. I'd like to change this to a half-open range for a couple of reasons:<div><br></div><div>- More consistent with C++ (begin() and end()).<br><div>- Empty ranges are useful to represent insertions (for my upcoming revised fixit patch)</div><div>- It is unclear what it means if the last character of a range is a multibyte character -- does the pointer refer to the start of the character, or the last byte in the character?</div></div><div>- It looks like some of the AsmParser uses of SMRange were already assuming this.</div><div><br></div><div>This patch should handle all of this, but I'm seeing a failure in the X86 disassembly tests. This confuses me because I didn't think the disassembler used SMRange.</div><div><br></div><div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; "></div></div><blockquote type="cite"><div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; ">/Volumes/Lore/llvm-public/llvm/test/MC/Disassembler/X86/enhanced.txt:5:10: error: expected string not found in input</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; "># CHECK: [o:movq][w: ][1-r:%gs=r{{[0-9]+}}][1-p::][1-l:8=8][p:,][w: ][0-r:%rcx=r{{[0-9]+}}] <mov> 0:[RCX/{{[0-9]+}}]=0 1:[GS/{{[0-9]+}}]=8</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; ">         ^</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; "><stdin>:2:1: note: scanning from here</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; ">[o:movq][w: ][1-r:%gs=r64][1-p::][1-l:8=8][1-p:,][w: ][0-r:%rcx=r109] <mov> 0:[RCX/109]=0 1:[GS/64]=8 </div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; ">^</div></div></blockquote><div><br></div><div>I'm usually up on the Clang side (all of this is trying to get a new warning into Clang TableGen, with a fixit), so I'm not sure how to debug this one. Does anyone have any ideas why this test would start failing?</div><div><br></div><div>This patch is 90% just modifying source info in the various parsers, but I'd appreciate if someone took a look at that as well to make sure I'm doing it sanely.</div><div><br></div><div>Comments?</div><div>Jordan</div><div><br></div><div></div></body></html>