ClangRefactoring: Improve symbol parsing

Declarations are only indexed if their file has been changed and references
has to be indexed if the file or any included file has been changed.

Change-Id: I07c6de1379bce2462c1e0fad34d4378a3da4397b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-08-16 18:17:42 +02:00
parent bc3e365e90
commit 6fba0be280
14 changed files with 158 additions and 38 deletions

View File

@@ -59,7 +59,7 @@ public:
if (!upToDate)
addOrUpdateNewEntry(filePathId, modifiedTime);
m_dependendFilesModified = m_dependendFilesModified || !upToDate;
m_dependentFilesModified = m_dependentFilesModified || !upToDate;
return upToDate ;
}
@@ -82,17 +82,17 @@ public:
m_modifiedTimeStamps = std::move(mergedModifiedTimeStamps);
m_newModifiedTimeStamps.clear();
m_dependendFilesModified = false;
m_dependentFilesModified = false;
}
bool dependendFilesModified() const
bool dependentFilesModified() const
{
return m_dependendFilesModified;
return m_dependentFilesModified;
}
bool alreadyParsedAllDependFiles(FilePathId filePathId, std::time_t modifiedTime)
bool alreadyParsedAllDependentFiles(FilePathId filePathId, std::time_t modifiedTime)
{
return alreadyParsed(filePathId, modifiedTime) && !dependendFilesModified();
return alreadyParsed(filePathId, modifiedTime) && !dependentFilesModified();
}
private:
@@ -114,7 +114,7 @@ private:
private:
std::vector<FilePathIdTime> m_modifiedTimeStamps;
std::vector<FilePathIdTime> m_newModifiedTimeStamps;
bool m_dependendFilesModified = false;
bool m_dependentFilesModified = false;
};
}