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

György Orbán via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 28 08:45:42 PDT 2018


Hi,


There was a problem with the missing severity levels. Usually the converter is used through CodeChecker, where they are available.

It should be fixed now on the master branch.

As Whisperity already mentioned, with make you can build the package and download the javascript dependencies.


$ cd vendor/plist_to_html

$ make clean all

$ ./build/bin/plist-to-html --help


Let us know if you still experience some issues.


Br,

Gyorgy Orban


________________________________
From: Whisperity <whisperity at gmail.com>
Sent: Thursday, September 27, 2018 8:54:49 AM
To: George Karpenkov
Cc: György Orbán; via cfe-dev
Subject: Re: [cfe-dev] [Proposal] New tool contributions to clang repository (gcc/g++ compilation database converter, plist to HTML converter)

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<mailto: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<mailto: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<mailto: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<mailto: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/20180928/9fb97dce/attachment.html>


More information about the cfe-dev mailing list