[cfe-dev] indexer plugin
Jy W via cfe-dev
cfe-dev at lists.llvm.org
Sat Oct 3 11:57:19 PDT 2015
Hello Daniel,
Maybe you'd like to check Mozilla's DXR project [1] that indexes C and C++
code and provides a web interface to view and search code. It's not as
accurate as Google's code search [2] for some templates, but DXR could be
used as a reference because it's open source.
[1]
https://github.com/mozilla/dxr
https://github.com/mozilla/dxr/blob/master/dxr/plugins/clang/dxr-index.cpp
[2] https://code.google.com/p/chromium/codesearch
- Jingyi
2015-10-03 8:30 GMT-04:00 Oberhoff, Daniel via cfe-dev <
cfe-dev at lists.llvm.org>:
> 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.
> >
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151003/0a1f5f8c/attachment.html>
More information about the cfe-dev
mailing list