I am pleased to announce an alpha release of DXR built on top of Clang. A live demo of DXR can be found at <http://dxr.mozilla.org/clang/>, which is an index of a relatively recent copy of the Clang source code. Since this is merely an alpha release, expect to find bugs and inconsistencies in the output. For more information, you can go to #static on irc.mozilla.org or contact Mozilla's static analysis list (<news://news.mozilla.org/mozilla.dev.static-analysis> or https://lists.mozilla.org/listinfo/dev-static-analysis>).
So what is DXR? DXR is a smart code browser that works by using instrumented compilers to use what the compiler knows about the code to provide a database of the code. For C and C++ in particular, using an instrumented compiler is necessary, since it is the only reliable way to fix the issue of macros. Take, for instance, RecursiveASTVisitor in the Clang codebase. Most of the almost 1200 functions are defined via macros as opposed to in raw code; as a consequence, the doxygen output for this class is useless: as far as I can tell, there are only five methods I can override to visit AST nodes. On the other hand, DXR neatly tells me all of the methods that are defined, and can point me to the place where that function is defined (within the macro, of course).
Where can you get the code? DXR is available at both <https://github.com/mozilla/dxr> (use the dxr-clang branch) and <http://hg.mozilla.org/webtools/dxr>. Instructions on how to use DXR can be found on its wiki page, <http://wiki.mozilla.org/DXR>.