[cfe-dev] indexer plugin

Oberhoff, Daniel via cfe-dev cfe-dev at lists.llvm.org
Sat Oct 3 05:30:38 PDT 2015


That’s interesting. I really have to check how rtags does this. It is fed with compilation commands for .o files (i.e. usually one per .cpp file). But I don’t know what it does for headers. I will get back once I have this figured out.

Thanks for answering.



> On Oct 2, 2015, at 10:19 PM, Luke Zarko <zarko at google.com> wrote:
> 
> Indexing a C++ project will produce a lot of data. It's difficult to tell when you're doing redundant work; for example, if two source files include the same header, it's not obvious whether the content of the header can be processed only once. As Manuel indicates, modules should help with this by limiting preprocessor shenanigans. Even then, you could still be in trouble if the header contains template definitions, since these are instantiated on demand (and your source files might make different demands). We're looking at various ways to deal with this problem for Kythe, where we spend most of our C++ processing time not in Clang but instead in handling the raw output from our indexing tool. I think that you'd end up in the same situation (except maybe for very small codebases, or if your data model doesn't store much detail)--you might get your index pieces for free, but the dominant cost of merging them all together will remain.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151003/0ffa0bcf/attachment.sig>


More information about the cfe-dev mailing list