FS#59492 - [qtcreator] clang-tidy and clazy analyzer not working correctly
Attached to Project:
Arch Linux
Opened by Martin (qso) - Monday, 30 July 2018, 22:27 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 26 August 2018, 08:45 GMT
Opened by Martin (qso) - Monday, 30 July 2018, 22:27 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 26 August 2018, 08:45 GMT
|
Details
Description:
In Qt Creator 4.7 clang-tidy and clazy analyzer do not produce results. Qt Creator 4.7 binary release from Qt Project is working fine. Additional info: * package version(s) qtcreator 4.7.0-1 * config and/or log files etc. no special config, clean empty environment (deleted qtcreator's .config and .local folders), just setup clang-tidy: tools -> options -> c++ -> code model -> select clang code model : clang-only checks for almost everything, (or any other option) Steps to reproduce: - open qtcreator - setup clang-tidy: tools -> options -> c++ -> code model -> select clang code model : clang-only checks for almost everything, (or any other option) - open a buggy c++ project - select analyzer -> clang-tidy and clazy - debug tab is opened project is scanned but no entries in "clang-tidy and clazy" section are produced - the issues are detected, you can see the warning message inside the code editor in the corresponding line When using Qt Project's Qt Creator version, all issues are reported in "clang-tidy and clazy" section as expected. Maybe Arch's qt project is compiled with wrong compile definitions. |
This task depends upon
Closed by Antonio Rojas (arojas)
Sunday, 26 August 2018, 08:45 GMT
Reason for closing: Fixed
Additional comments about closing: qtcreator 4.7.0-2
Sunday, 26 August 2018, 08:45 GMT
Reason for closing: Fixed
Additional comments about closing: qtcreator 4.7.0-2
2. open "Tools"->"Options"->"C++"->"Code Model"->"Diagnostic Configuration" = "Clang-only checks for almost everything [built-in] -> "Ok"
3. back in main window: select "Analyze"->"Clang-Tidy and Clazy"->"Analyze"
4. Debug View opens and shows "Clang-Tidy and Clazy" results with no entries!
5. Repeat all steps with binary qtcreator provided by qt.io
6. 3 results will be shown, as expected.
With "Clang-only checks for almost everything [built-in]" I'm not getting any result
With "Clang-tidy and clazy preselected checks" I only get one
With "Clang-tidy static analyzer checks" I get the three results
(all this with upstream's binary qtcreator)
/usr/bin/clang-6.0 -fsyntax-only -Xclang -add-plugin -Xclang clang-tidy -Xclang -plugin-arg-clang-tidy -Xclang '-checks=-*,clang-analyzer-*' /path/to/main.cpp
returns a few warnings with qtcreator's clang, but nothing with Arch's clang
http://code.qt.io/cgit/clang/clang.git/commit/?id=7f349701d3ea0c47be3a43e265699dddd3fd55cf
So qtcreator requires a forked version of clang, great.