Bug 399090 - qcolor-from-literal test failure
Summary: qcolor-from-literal test failure
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-26 07:49 UTC by eric.lemanissier
Modified: 2018-09-26 17:02 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description eric.lemanissier 2018-09-26 07:49:33 UTC
When building clazy with clang-6.0, I get "Enabling AST Matchers workaround. Consider building with gcc instead. See bug #392223." as expected, but then the auto tests fail with the following:
[FAIL] qcolor-from-literal
--- qcolor-from-literal/main.cpp.expected	2018-03-27 11:52:07.519079681 +0200
+++ qcolor-from-literal/main.cpp.result	2018-09-22 23:56:48.944396029 +0200
@@ -1,7 +1,2 @@
 qcolor-from-literal/main.cpp:15:22: warning: The ctor taking ints is cheaper than QColor::setNamedColor(QString) [-Wclazy-qcolor-from-literal]
 qcolor-from-literal/main.cpp:16:36: warning: The ctor taking ints is cheaper than QColor::setNamedColor(QString) [-Wclazy-qcolor-from-literal]
-qcolor-from-literal/main.cpp:8:15: warning: The QColor ctor taking ints is cheaper than the one taking string literals [-Wclazy-qcolor-from-literal]
-qcolor-from-literal/main.cpp:11:15: warning: The QColor ctor taking ints is cheaper than the one taking string literals [-Wclazy-qcolor-from-literal]
-qcolor-from-literal/main.cpp:12:15: warning: The QColor ctor taking ints is cheaper than the one taking string literals [-Wclazy-qcolor-from-literal]
-qcolor-from-literal/main.cpp:13:15: warning: The QColor ctor taking ints is cheaper than the one taking string literals [-Wclazy-qcolor-from-literal]
-qcolor-from-literal/main.cpp:17:17: warning: The QColor ctor taking ints is cheaper than the one taking string literals [-Wclazy-qcolor-from-literal]
Comment 1 Sergio Martins 2018-09-26 16:44:28 UTC
Git commit 13eec46c92ead7d60487dfe26c5681839f7b809f by Sergio Martins.
Committed on 26/09/2018 at 16:41.
Pushed by smartins into branch '1.4'.

Don't register qstring-from-literal if ast matchers are disabled

Next we need a way for the unit-tests to know that this
check isn't available

M  +2    -1    checks.json
M  +2    -0    src/Checks.h

https://commits.kde.org/clazy/13eec46c92ead7d60487dfe26c5681839f7b809f
Comment 2 Sergio Martins 2018-09-26 17:02:47 UTC
Git commit f23e6d246592b5ad767678a786dcb0f8c83b296a by Sergio Martins.
Committed on 26/09/2018 at 17:02.
Pushed by smartins into branch '1.4'.

Don't run tests for checks that clazy wasn't compiled with

M  +8    -0    tests/run_tests.py

https://commits.kde.org/clazy/f23e6d246592b5ad767678a786dcb0f8c83b296a