[cfe-dev] [Proposal] New tool contributions to clang repository (gcc/g++ compilation database converter, plist to HTML converter)

Whisperity via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 26 23:54:49 PDT 2018


I think you'll have to first run a "make" on the package
(vendor/plist-to-html in the CodeChecker repository) so third-party
dependencies such as CodeMirror are downloaded and put to the appropriate
place.

On Wed, 26 Sep 2018, 19:59 George Karpenkov via cfe-dev, <
cfe-dev at lists.llvm.org> wrote:

> Hi Gyorgy,
>
> On Sep 25, 2018, at 11:41 AM, György Orbán via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
> 2. Plist to HTML report conversion tool
>
>
> I’d really love to have that in Clang, and I think that is an amazing tool!
> However, I’ve tried to launch it and failed — it seemed to look for files
> which are not there.
> I would be happy to review patches for that — but I think the tool would
> require quite a lot of work.
>
>
> 1. gcc/g++ compilation database to Clang compilation database conversion
> tool
>
> One problem is what we want to address is that gcc/g++ compilation
> commands cannot be forwarded without modification
> to the Clang based tools as they were logged or exported by the build
> system.
>
> Post-processing of the compilation command is required:
> - might contain compilation flags and build targets which are not
> compatible with Clang (needs to be filtered out)
> - the compilation argument filtering needs to be done in every tool which
> uses the compilation database json (scan-build, scan-build-py, CodeChecker)
> - when gcc is used as a cross compiler, hard-coded include paths, flags
> and compilation target of gcc/g++ are missing from the command line
> argument list. These needs to be auto-detected and passed to Clang before
> analysis.
> - C/C++ standard versions might be missing from the compilation commands
> which could change the analysis results (c++11 checker triggers for c++98
> code)
>
> Our idea is to create a separate tool which could transform a gcc/g++
> compilation database file into a compile command json file which can be
> used by Clang based tools without further modification.
> The non-compatible flags are filtered out and the necessary cross
> compilation include paths and compilation flags are added.
> Other Clang based tools could also benefit from the converted compilation
> database json, like clangd.
>
> 2. Plist to HTML report conversion tool (see the source code at
> https://github.com/Ericsson/codechecker/tree/master/vendor/plist_to_html)
>
> Currently Clang Static Analyzer can produce HTML output but this should
> not be done necessarily by the analyzer.
> Plist reports can contain much more information and are easier to manage
> and parse by other tools compared to the html reports.
> With our HTML generator tool we can generate static HTML reports which
> look similar to the report visualization in Xcode or
> to the report viewer web UI of CodeChecker. You can move on each event
> through a bug path and arrows are shown for easier understanding.
>
> Let us know what do you think about these tools, how well would they fit
> near the available tools.
> Your feedback is appreciated.
>
> Thanks,
> Gyorgy Orban
> CodeChecker Team
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> 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/20180927/e2164c23/attachment.html>


More information about the cfe-dev mailing list