<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 9, 2018 at 2:06 PM, Sam McCall via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I never felt that I completely understood the code I wrote/reviewed in tools dealing with SourceLocation. And clangd has had several bugs that boil down to wrong locations in the presence of macros.</div><div><br></div><div>I couldn't find a good guide for how to think about them, so I spent a while reading the source code and wrote a tool to visualize them, which helped me a lot:</div><div>  <a href="https://imgur.com/f3cXp7E" target="_blank">https://imgur.com/f3cXp7E</a></div></div></blockquote><div><br></div><div>More documentation is always good, but I for one have no idea what's going on in that image, and I like to think that I mostly understand SourceLocation :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>(black edges are expansion, yellow edges are source)</div><div><br></div><div>Did I miss some documentation of this concept?</div><div>Would it be worth writing up an article illustrated with some examples, to add to <a href="http://llvm.org" target="_blank">llvm.org</a>? Maybe this is niche or well-understood, interested in what others think.</div></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>