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: https://dl.dropboxusercontent.com/u/15602400/template-insts-dump.html
Generated from this C++ code: https://dl.dropboxusercontent.com/u/15602400/template-insts.cpp
The tool is available here: https://github.com/eliben/llvm-clang-samples/blob/master/tools/htmlize-ast-dump.py - 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.