<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Apr 9, 2018 at 8:06 PM Sam McCall via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><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><br></div><div>(black edges are expansion, yellow edges are source)</div></div></blockquote><div><br></div><div>Cool. I once had a CL to help print SLs in a more readable way, but it bitrotted under Richard's unforgiving eyes :)</div><div>This is way cooler though.</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>Did I miss some documentation of this concept?</div></div></blockquote><div><br></div><div>Nope. I touched a bit on this in my AST talk, but it's really missing.</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>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></blockquote><div><br></div><div>A talk at an LLVM conf would also be cool :D</div><div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div></div></div>