summaryrefslogtreecommitdiff
path: root/src/plugins/clangtools/executableinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/clangtools/executableinfo.cpp')
-rw-r--r--src/plugins/clangtools/executableinfo.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/clangtools/executableinfo.cpp b/src/plugins/clangtools/executableinfo.cpp
index f15348c731..84c6099094 100644
--- a/src/plugins/clangtools/executableinfo.cpp
+++ b/src/plugins/clangtools/executableinfo.cpp
@@ -98,8 +98,13 @@ static QStringList queryClangTidyChecks(const QString &executable,
static ClazyChecks querySupportedClazyChecks(const QString &executablePath)
{
- const CommandLine commandLine(executablePath, {"-supported-checks-json"});
- const QString jsonOutput = runExecutable(commandLine);
+ static const QString queryFlag = "-supported-checks-json";
+ QString jsonOutput = runExecutable(CommandLine(executablePath, {queryFlag}));
+
+ // Some clazy 1.6.x versions have a bug where they expect an argument after the
+ // option.
+ if (jsonOutput.isEmpty())
+ jsonOutput = runExecutable(CommandLine(executablePath, {queryFlag, "dummy"}));
if (jsonOutput.isEmpty())
return {};