Peter Collingbourne via llvm-dev
2016-Mar-10 19:26 UTC
[llvm-dev] announcing an *early preview* of a cross-referencing code search website for LLVM
Hi, I've found that one of the most useful tools in the Chromium project is its code search website, http://cs.chromium.org/ At http://llvm-cs.pcc.me.uk/ you will find something similar for llvm. You can search the full text of the llvm/clang/lld/lldb repositories using regular expressions, search for declarations (which are prioritized above full-text results), and follow cross references between definitions and references. The code behind this website is based on kythe [1] (Kythe itself uses the clang libraries to parse C++ code) and Russ Cox's codesearch [2] library. I'm planning to open source it and contribute it to the kythe project. Thanks, -- Peter [1] http://kythe.io/ [2] https://github.com/google/codesearch -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160310/e77cfa00/attachment.html>
Cacho via llvm-dev
2016-Mar-10 20:05 UTC
[llvm-dev] announcing an *early preview* of a cross-referencing code search website for LLVM
Hi, I like Kythe and this approach, but you may want to check DXR [0] that is similar (with a little nicer interface). Browse Firefox's code with DXR to feel what it's like [1]. The approach is basically building the project while building all the information+references. It's adding plugins for more languages too (other than C/C++). [0] https://github.com/mozilla/dxr [1] https://dxr.mozilla.org/mozilla-central/source/ On 03/10/2016 02:26 PM, Peter Collingbourne via llvm-dev wrote:> Hi, > > I've found that one of the most useful tools in the Chromium project > is its code search website, http://cs.chromium.org/ > > At http://llvm-cs.pcc.me.uk/ you will find something similar for llvm. > You can search the full text of the llvm/clang/lld/lldb repositories > using regular expressions, search for declarations (which are > prioritized above full-text results), and follow cross references > between definitions and references. > > The code behind this website is based on kythe [1] (Kythe itself uses > the clang libraries to parse C++ code) and Russ Cox's codesearch [2] > library. I'm planning to open source it and contribute it to the kythe > project. > > Thanks, > -- > Peter > > [1] http://kythe.io/ > [2] https://github.com/google/codesearch > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Peter Collingbourne via llvm-dev
2016-Mar-10 21:55 UTC
[llvm-dev] announcing an *early preview* of a cross-referencing code search website for LLVM
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. Peter [1] http://clang.llvm.org/docs/JSONCompilationDatabase.html On Thu, Mar 10, 2016 at 12:05 PM, Cacho via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > I like Kythe and this approach, but you may want to check DXR [0] that > is similar (with a little nicer interface). Browse Firefox's code with > DXR to feel what it's like [1]. > The approach is basically building the project while building all the > information+references. It's adding plugins for more languages too > (other than C/C++). > > [0] https://github.com/mozilla/dxr > [1] https://dxr.mozilla.org/mozilla-central/source/ > > On 03/10/2016 02:26 PM, Peter Collingbourne via llvm-dev wrote: > > Hi, > > > > I've found that one of the most useful tools in the Chromium project > > is its code search website, http://cs.chromium.org/ > > > > At http://llvm-cs.pcc.me.uk/ you will find something similar for llvm. > > You can search the full text of the llvm/clang/lld/lldb repositories > > using regular expressions, search for declarations (which are > > prioritized above full-text results), and follow cross references > > between definitions and references. > > > > The code behind this website is based on kythe [1] (Kythe itself uses > > the clang libraries to parse C++ code) and Russ Cox's codesearch [2] > > library. I'm planning to open source it and contribute it to the kythe > > project. > > > > Thanks, > > -- > > Peter > > > > [1] http://kythe.io/ > > [2] https://github.com/google/codesearch > > > > > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- -- Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160310/c7cf74c3/attachment.html>
Shahms King via llvm-dev
2016-Mar-10 23:15 UTC
[llvm-dev] announcing an *early preview* of a cross-referencing code search website for LLVM
Nice! Glad to see some work progressing on a UI :-) --Shahms On Thu, Mar 10, 2016 at 11:26 AM, Peter Collingbourne <peter at pcc.me.uk> wrote:> Hi, > > I've found that one of the most useful tools in the Chromium project is > its code search website, http://cs.chromium.org/ > > At http://llvm-cs.pcc.me.uk/ you will find something similar for llvm. > You can search the full text of the llvm/clang/lld/lldb repositories using > regular expressions, search for declarations (which are prioritized above > full-text results), and follow cross references between definitions and > references. > > The code behind this website is based on kythe [1] (Kythe itself uses the > clang libraries to parse C++ code) and Russ Cox's codesearch [2] library. > I'm planning to open source it and contribute it to the kythe project. > > Thanks, > -- > Peter > > [1] http://kythe.io/ > [2] https://github.com/google/codesearch >-- :-P -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160310/3eb38e62/attachment.html>