[cfe-dev] Does SourceLocation need more documentation?

Nico Weber via cfe-dev cfe-dev at lists.llvm.org
Mon Apr 9 11:15:02 PDT 2018

On Mon, Apr 9, 2018 at 2:06 PM, Sam McCall via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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.
> 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:
>   https://imgur.com/f3cXp7E

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 :-)

> (black edges are expansion, yellow edges are source)
> Did I miss some documentation of this concept?
> Would it be worth writing up an article illustrated with some examples, to
> add to llvm.org? Maybe this is niche or well-understood, interested in
> what others think.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180409/c51b5fc2/attachment.html>

More information about the cfe-dev mailing list