[cfe-dev] Producing compilation databases (was Re: Clang-based indexer and code navigator)

bruce.r.stephens at gmail.com bruce.r.stephens at gmail.com
Tue Mar 12 11:26:34 PDT 2013


Sean Silva <silvas-olO2ZdjDehc3uPMLIKxrzw at public.gmane.org> writes:

[...]

> We seem to have a proliferation of Clang-based source navigators (DXR,
> woboq, and now SourceWeb). It would be really great if you could get
> in contact with the authors of these other tools (I see Oliver Goffart
> is already in this thread) and discuss what kinds of issues you ran
> into when developing the respective tools (you probably want to
> contact jcranmer for DXR); if there appear to be some common issues,
> it would make sense to get that information upstream so that we can
> fix/improve the situation. It would probably be sufficient to send a
> mail to cfe-dev CC'ing them.

Agreed. I'm not sure that there will in fact be much overlap, but if
there is, it would be good to move it upstream. (I'm basing that on
playing with DXR's plugin, which seems fairly lightweight, as these
things go.)

One possibility (which doesn't apply to DXR, which is a compiler plugin)
is producing a compilation database. Using LD_PRELOAD and stuff feels
yucky, and cmake is (to me) useless (the projects I care about mostly
don't use cmake).

Can clang dump the relevant information in the right form? Feels like it
ought to be easy for it to do so, and that would surely be a clean way
to do it, presuming a project can be made to build with clang/clang++?
(Maybe it could be folded somehow with scan-build?)

> Also, if there is enough common ground between your objectives, it
> would be really cool if we could pool effort and develop a solution on
> trunk in clang-tools-extra: and then dogfood it! I've been wanting a
> better source navigator than Doxygen's source listings for a while
> now, and I think it would be appreciated.

It would be neat to have that available alongside the doxygen API docs.



More information about the cfe-dev mailing list