forked from qt-creator/qt-creator
ClangTools: use VFSoverlay if the clang tool supports it
check the help output of a clang tool whether virtual file system overlay is supported. Prepares for the vfso support of clazy-standalone. Change-Id: I157c94de1dda41c83945c9bc8a4c2e132b2e6551 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -186,7 +186,7 @@ void DocumentClangToolRunner::run()
|
||||
return createRunner<ClangTidyRunner>(config, env);
|
||||
};
|
||||
}
|
||||
if (config.isClazyEnabled() && !m_document->isModified()) {
|
||||
if (config.isClazyEnabled()) {
|
||||
m_runnerCreators << [this, env, config]() {
|
||||
return createRunner<ClazyStandaloneRunner>(config, env);
|
||||
};
|
||||
@@ -218,7 +218,8 @@ 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 (clangIncludeDir.isEmpty() || clangVersion.isEmpty()
|
||||
|| (m_document->isModified() && !m_currentRunner->supportsVFSOverlay())) {
|
||||
runNext();
|
||||
} else {
|
||||
AnalyzeUnit unit(m_fileInfo, clangIncludeDir, clangVersion);
|
||||
|
||||
Reference in New Issue
Block a user