Use updated ProjectInfo

...that actually make us use the ProjectInfo with updated
CompilerCallData.

Change-Id: Ieee298b3db64159f3faa02231921275e4466bcb5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2014-11-07 11:32:40 +01:00
parent 2f3666a3f0
commit b6a50a1a4c
3 changed files with 29 additions and 17 deletions

View File

@@ -71,19 +71,19 @@ RunControl *ClangStaticAnalyzerRunControlFactory::create(RunConfiguration *runCo
Q_UNUSED(runMode);
using namespace CppTools;
const ProjectInfo projectInfoAtAnalyzerStart = m_tool->projectInfo();
QTC_ASSERT(projectInfoAtAnalyzerStart.isValid(), return 0);
const ProjectInfo projectInfoBeforeBuild = m_tool->projectInfoBeforeBuild();
QTC_ASSERT(projectInfoBeforeBuild.isValid(), return 0);
Project *project = SessionManager::startupProject();
QTC_ASSERT(project, return 0);
const ProjectInfo projectInfoNow = CppModelManager::instance()->projectInfo(project);
const ProjectInfo projectInfoAfterBuild = CppModelManager::instance()->projectInfo(project);
if (projectInfoNow.configurationOrFilesChanged(projectInfoAtAnalyzerStart)) {
if (projectInfoAfterBuild.configurationOrFilesChanged(projectInfoBeforeBuild)) {
// If it's more than a release/debug build configuration change, e.g.
// a version control checkout, files might be not valid C++ anymore
// or even gone, so better stop here.
m_tool->resetCursorAndProjectInfo();
m_tool->resetCursorAndProjectInfoBeforeBuild();
if (errorMessage) {
*errorMessage = tr(
"The project configuration changed since the start of the Clang Static Analyzer. "