forked from qt-creator/qt-creator
Clang Static Analyzer: Re-enable for all project managers and tool chains
This reverts commit 6b77dea65a
and also
removes checks for the specific tool chains and thus makes it possible
to start the clang static analyzer independent of the specific
project/toolchain.
Though we only support and test qbs/qmake projects with certain
toolchains, users reported that they also had useful results for cmake
projects.
Task-number: QTCREATORBUG-15980
Change-Id: I27834c148c1a0d7855bebad0bb203bd807e7ad46
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -70,10 +70,6 @@ bool ClangStaticAnalyzerRunControlFactory::canRun(RunConfiguration *runConfigura
|
||||
|
||||
Project *project = runConfiguration->target()->project();
|
||||
QTC_ASSERT(project, return false);
|
||||
|
||||
if (project->id() != "Qt4ProjectManager.Qt4Project" && project->id() != "Qbs.QbsProject")
|
||||
return false;
|
||||
|
||||
const Core::Context context = project->projectLanguages();
|
||||
if (!context.contains(ProjectExplorer::Constants::LANG_CXX))
|
||||
return false;
|
||||
@@ -83,10 +79,7 @@ bool ClangStaticAnalyzerRunControlFactory::canRun(RunConfiguration *runConfigura
|
||||
Kit *kit = target->kit();
|
||||
QTC_ASSERT(kit, return false);
|
||||
ToolChain *toolChain = ToolChainKitInformation::toolChain(kit);
|
||||
return toolChain && (toolChain->typeId() == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID
|
||||
|| toolChain->typeId() == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID
|
||||
|| toolChain->typeId() == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID
|
||||
|| toolChain->typeId() == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID);
|
||||
return toolChain;
|
||||
}
|
||||
|
||||
RunControl *ClangStaticAnalyzerRunControlFactory::create(RunConfiguration *runConfiguration,
|
||||
|
Reference in New Issue
Block a user