forked from qt-creator/qt-creator
Clang: fix clang static analyzer on Windows
1) mingw kit + qmake: do not add target includes not to override clang paths (for intrinsics and more) 2) msvc kit + qbs: remove target option from clang-cl arguments Change-Id: Ifb494ee61ae2d39e957cff31dbd647c66910be17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -75,6 +75,13 @@ void ClangStaticAnalyzerUnitTests::testProject()
|
||||
{
|
||||
QFETCH(QString, projectFilePath);
|
||||
QFETCH(int, expectedDiagCount);
|
||||
if (projectFilePath.contains("mingw")) {
|
||||
const ToolChain * const toolchain
|
||||
= ToolChainKitInformation::toolChain(KitManager::kits().first(),
|
||||
Constants::CXX_LANGUAGE_ID);
|
||||
if (toolchain->typeId() != ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID)
|
||||
QSKIP("This test is mingw specific, does not run for other toolchais");
|
||||
}
|
||||
|
||||
CppTools::Tests::ProjectOpenerAndCloser projectManager;
|
||||
const CppTools::ProjectInfo projectInfo = projectManager.open(projectFilePath, true);
|
||||
@@ -107,6 +114,9 @@ void ClangStaticAnalyzerUnitTests::testProject_data()
|
||||
|
||||
addTestRow("qt-essential-includes/qt-essential-includes.qbs", 0);
|
||||
addTestRow("qt-essential-includes/qt-essential-includes.pro", 0);
|
||||
|
||||
addTestRow("mingw-includes/mingw-includes.qbs", 0);
|
||||
addTestRow("mingw-includes/mingw-includes.pro", 0);
|
||||
}
|
||||
|
||||
void ClangStaticAnalyzerUnitTests::addTestRow(const QByteArray &relativeFilePath,
|
||||
|
||||
Reference in New Issue
Block a user