<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 30, 2012, at 11:32 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">On Fri, Nov 30, 2012 at 8:18 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com" target="_blank">dgregor@apple.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Nov 29, 2012, at 1:16 PM, Daniel Jasper <<a href="mailto:djasper@google.com">djasper@google.com</a>> wrote:<br>
<br>
><br>
>  Ping.<br>
><br>
>  Also, we are continuing the development on <a href="https://github.com/djasper/clang/tree/format" target="_blank">https://github.com/djasper/clang/tree/format</a>, but I am currently not updating this patch in fear of prolonging the review even more. It has reached a stage where it starts improving my workflow thanks to a little vim integration I have hacked together ...<br>

<br>
</div>A few questions and comments on the patch, but IMO I'd rather see this go into the main Clang tree soon and get hacked on there, since it looks like we're moving in the right direction and it's obviously functionality we want in the core.<br>

<br>
+/// \brief A character range of source code.<br>
+struct CodeRange {<br>
+  CodeRange(unsigned Offset, unsigned Length)<br>
+    : Offset(Offset), Length(Length) {}<br>
+<br>
+  unsigned Offset;<br>
+  unsigned Length;<br>
+};<br>
<br>
Why isn't this a SourceRange or CharSourceRange?<br></blockquote><div><br></div><div>This would put the burden on the client to do the "Offset+Length -> SourceRange" translation. But you're right, in this case that might be the right trade-off…</div></div></div></div></blockquote><div><br></div><div>This seems like a *very* small burden to eliminate two similar-but-not-the-same concepts with disturbingly similar names. It's CharSourceRange you want, though.</div><br><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div class="gmail_extra"><div class="gmail_quote"><div>Once the first version is checked in, we'll next check a tool into clang-extra-tools plus some nice vi integration with which you can run it over code snippets (or full files). Daniel actually has built that, and the fact that this is already surprisingly useful has accelerated development here somewhat :)</div>
</div></div></div></blockquote></div><br><div>Okay!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>- Doug</div></body></html>