<div dir="ltr">Thanks. I was aware of DXR, but I didn't know that they were using Clang. Kythe uses a similar approach, but there's no need to actually build the whole project, you just need a compilation database [1]. In LLVM's case, I need to arrange to build all the tablegen'd files upfront, and I have a hacky script that does so by parsing the "ninja -t commands" output.<div><br></div><div>Peter</div><div><br></div><div>[1] <a href="http://clang.llvm.org/docs/JSONCompilationDatabase.html">http://clang.llvm.org/docs/JSONCompilationDatabase.html</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 10, 2016 at 12:05 PM, Cacho via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I like Kythe and this approach, but you may want to check DXR [0] that<br>
is similar (with a little nicer interface). Browse Firefox's code with<br>
DXR to feel what it's like [1].<br>
The approach is basically building the project while building all the<br>
information+references. It's adding plugins for more languages too<br>
(other than C/C++).<br>
<br>
[0] <a href="https://github.com/mozilla/dxr" rel="noreferrer" target="_blank">https://github.com/mozilla/dxr</a><br>
[1] <a href="https://dxr.mozilla.org/mozilla-central/source/" rel="noreferrer" target="_blank">https://dxr.mozilla.org/mozilla-central/source/</a><br>
<div><div class="h5"><br>
On 03/10/2016 02:26 PM, Peter Collingbourne via llvm-dev wrote:<br>
> Hi,<br>
><br>
> I've found that one of the most useful tools in the Chromium project<br>
> is its code search website, <a href="http://cs.chromium.org/" rel="noreferrer" target="_blank">http://cs.chromium.org/</a><br>
><br>
> At <a href="http://llvm-cs.pcc.me.uk/" rel="noreferrer" target="_blank">http://llvm-cs.pcc.me.uk/</a> you will find something similar for llvm.<br>
> You can search the full text of the llvm/clang/lld/lldb repositories<br>
> using regular expressions, search for declarations (which are<br>
> prioritized above full-text results), and follow cross references<br>
> between definitions and references.<br>
><br>
> The code behind this website is based on kythe [1] (Kythe itself uses<br>
> the clang libraries to parse C++ code) and Russ Cox's codesearch [2]<br>
> library. I'm planning to open source it and contribute it to the kythe<br>
> project.<br>
><br>
> Thanks,<br>
> --<br>
> Peter<br>
><br>
> [1] <a href="http://kythe.io/" rel="noreferrer" target="_blank">http://kythe.io/</a><br>
> [2] <a href="https://github.com/google/codesearch" rel="noreferrer" target="_blank">https://github.com/google/codesearch</a><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div>