[cfe-dev] Doxygen 1.8.4 uses libclang to improve parsing

Manuel Klimek klimek at google.com
Mon May 20 12:57:12 PDT 2013

On Mon, May 20, 2013 at 7:53 PM, Chandler Carruth <chandlerc at google.com>wrote:

> On Mon, May 20, 2013 at 5:38 PM, David Röthlisberger <david at rothlis.net>wrote:
>> On 20 May 2013, at 18:19, Dimitri van Heesch wrote:
>> > I'm pleased to announce that as of version 1.8.4 doxygen can optionally
>> use libclang to
>> > provide a more accurate source browsing experience, and better syntax
>> highlighting,
>> > cross referencing, and call graphs.
>> Great news! How does it work: How does doxygen get hold of the compiler
>> flags that it needs to pass to clang?
>> (This is the hardest thing I've found with any clang-based tooling.)
> We designed a whole system to solve this problem. Some documentation:
> http://clang.llvm.org/docs/JSONCompilationDatabase.html#json-compilation-database-format-specification
> http://clang.llvm.org/docs/LibTooling.html#writing-a-standalone-tool
> It would be best to re-use this work so that all of the tools use the same
> platform for communicating with build systems.

And that context brings up the need for having a .h file mapping for the
compilation database again. Daniel had the idea that we might get the 99%
case by simply looking for files with the same base name to compile (and
look whether the header is "obviously" included from there), but it still
seems, um, dirty.

The other way would be to somehow mark the include dump files that
compilers produce to be input to the compilation database, so we can build
up the reverse graph from there, but that would always require enough of a
build (but that's already true for generated files).

/me is still looking for good ideas here...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130520/a363d811/attachment.html>

More information about the cfe-dev mailing list