<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">Hi György!</div><div class=""><br class=""></div><div class="">I initially though the GCC conversion logic could be put directly in Clang, so that users to not have to run a separate tool. I thought perhaps in clangTooling would be a good fit then a lot of tools could reuse it. In my ideal world (as a user!) I would just have to run CMake then Clangd, Clang-tidy, etc would be able to load the compilation database without me having to worry about another tool to run after executing CMake. Otherwise, it would be more difficult to set things up. For example, I (as a user) would have to wrap by build workflow to run cmake plus that conversion tool and point Clangd to that newly generated CDB. Or, Clangd would have to detect that the CDB contains gcc commands, run the external tool (which might or might not be there) to convert the CDB then load it. I’m curious to know what you think about those scenarios.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Marc-André</div><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 25, 2018, at 2:41 PM, György Orbán via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="divtagdefaultwrapper" dir="ltr" style="caret-color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p><div class="">Hi All,<br class=""> <br class="">There are multiple features in CodeChecker which could be split into smaller tools so the community could benefit from them.<br class=""><br class="">1. gcc/g++ compilation database to Clang compilation database conversion tool<br class="">2. Plist to HTML report conversion tool<br class=""><br class="">1. gcc/g++ compilation database to Clang compilation database conversion tool<br class=""><br class="">One problem is what we want to address is that gcc/g++ compilation commands cannot be forwarded without modification<br class="">to the Clang based tools as they were logged or exported by the build system.<br class=""> <br class="">Post-processing of the compilation command is required:<br class="">- might contain compilation flags and build targets which are not compatible with Clang (needs to be filtered out)<br class="">- the compilation argument filtering needs to be done in every tool which uses the compilation database json (scan-build, scan-build-py, CodeChecker)<br class="">- 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.<br class="">- 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)<br class=""> <br class="">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.<br class="">The non-compatible flags are filtered out and the necessary cross compilation include paths and compilation flags are added.<br class="">Other Clang based tools could also benefit from the converted compilation database json, like clangd.<br class=""> <br class="">2. Plist to HTML report conversion tool (see the source code at<span class="Apple-converted-space"> </span><a href="https://github.com/Ericsson/codechecker/tree/master/vendor/plist_to_html" class="">https://github.com/Ericsson/codechecker/tree/master/vendor/plist_to_html</a><span class="Apple-converted-space"> </span>)<br class=""><br class="">Currently Clang Static Analyzer can produce HTML output but this should not be done necessarily by the analyzer.<br class="">Plist reports can contain much more information and are easier to manage and parse by other tools compared to the html reports.<br class="">With our HTML generator tool we can generate static HTML reports which look similar to the report visualization in Xcode or<br class="">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.<br class=""> <br class="">Let us know what do you think about these tools, how well would they fit near the available tools.<br class="">Your feedback is appreciated.<br class=""> <br class="">Thanks,<br class="">Gyorgy Orban<br class="">CodeChecker Team</div><p style="margin-top: 0px; margin-bottom: 0px;" class=""></p></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">cfe-dev mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:cfe-dev@lists.llvm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">cfe-dev@lists.llvm.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></div></blockquote></div><br class=""></body></html>