ClangTools: Avoid assert when no tool executable is configured

The assert is in ClangToolRunner::run.

Change-Id: I195db04631548e6b7ae9d5360827933889433b9d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-01-06 09:14:21 +01:00
parent e809f665e4
commit be3677c02e

View File

@@ -247,7 +247,7 @@ void DocumentClangToolRunner::runNext()
auto [clangIncludeDir, clangVersion] = getClangIncludeDirAndVersion(m_currentRunner.get());
qCDebug(LOG) << Q_FUNC_INFO << m_currentRunner->executable() << clangIncludeDir
<< clangVersion << m_fileInfo.file;
if (clangIncludeDir.isEmpty() || clangVersion.isEmpty()
if (m_currentRunner->executable().isEmpty() || clangIncludeDir.isEmpty() || clangVersion.isEmpty()
|| (m_document->isModified() && !m_currentRunner->supportsVFSOverlay())) {
runNext();
} else {