Cross-referenced HTML dumps of Clang ASTs


The AST dump generated by Clang is very important for frontend work and developing source transformation tools, but often I find myself wasting a lot of time navigating around it.

To make this somewhat easier, I built a simple tool through which you can pipe the output of -ast-dump. It emits an HTML file (colored similarly to the colored mode of the AST dump) where node addresses are links. You can jump from uses to definitions, and use a navigation pane to explore a node’s parent, children and users.

Sample HTML dump:
Generated from this C++ code:

The tool is available here: - it’s self contained and the code is in the public domain, so feel free to use it.

Hope others find this useful! Ideas for improvement are welcome.