summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2019-11-29 09:52:02 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2019-12-18 13:54:39 +0000
commit962ea69a1fe61cca39f3e728dd150ccefb11f6b3 (patch)
tree207f96f5a8f2732aad1c839a5f277aad09c7170e
parentbe549f233fe03a8357843356f8fd541a15937190 (diff)
downloadqt-creator-962ea69a1fe61cca39f3e728dd150ccefb11f6b3.tar.gz
ClangTools: Fix invocation for plugin runner
This was forgotten when the new default clang-tidy and clazy diagnostic config was introduced. Change-Id: Ic8a82ec2b06178a623ac1d1e50dcbc2b3d0174da Reviewed-by: Cristian Adam <cristian.adam@qt.io>
-rw-r--r--src/plugins/clangtools/clangtidyclazyrunner.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/clangtools/clangtidyclazyrunner.cpp b/src/plugins/clangtools/clangtidyclazyrunner.cpp
index dcee2bd15c..08bb13b478 100644
--- a/src/plugins/clangtools/clangtidyclazyrunner.cpp
+++ b/src/plugins/clangtools/clangtidyclazyrunner.cpp
@@ -61,12 +61,10 @@ static QStringList clazyPluginArguments(const ClangDiagnosticConfig diagnosticCo
{
QStringList arguments;
- const QString clazyChecks = diagnosticConfig.clazyChecks();
- if (!clazyChecks.isEmpty()) {
- arguments << XclangArgs({"-add-plugin",
- "clazy",
- "-plugin-arg-clazy",
- diagnosticConfig.clazyChecks()});
+ if (diagnosticConfig.isClazyEnabled()) {
+ arguments << XclangArgs({"-add-plugin", "clazy"});
+ if (!diagnosticConfig.clazyChecks().isEmpty())
+ arguments << XclangArgs({"-plugin-arg-clazy", diagnosticConfig.clazyChecks()});
}
return arguments;