forked from qt-creator/qt-creator
Clang: Fix some issues with running indexer over Qt Creator
- fix qDebug channels on Windows - fix the number of perameters in the sql statement - fix nullptr access - speed up preprocessor a little bit Change-Id: Ic9b32fbcc6b409c4064c4f522b94391cbff8654e Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -95,8 +95,6 @@ public:
|
||||
|
||||
bool isClean() const;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
RefactoringCompilationDatabase m_compilationDatabase;
|
||||
std::vector<FileContent> m_fileContents;
|
||||
|
||||
@@ -341,12 +341,14 @@ public:
|
||||
m_database};
|
||||
mutable ReadStatement m_getProjectPartArtefactsBySourceId{
|
||||
"SELECT toolChainArguments, compilerMacros, systemIncludeSearchPaths, "
|
||||
"projectIncludeSearchPaths, projectPartId FROM projectParts WHERE projectPartId = (SELECT "
|
||||
"projectIncludeSearchPaths, projectPartId, language, languageVersion, languageExtension "
|
||||
"FROM projectParts WHERE projectPartId = (SELECT "
|
||||
"projectPartId FROM projectPartsSources WHERE sourceId = ?)",
|
||||
m_database};
|
||||
mutable ReadStatement m_getProjectPartArtefactsByProjectPartName{
|
||||
"SELECT toolChainArguments, compilerMacros, systemIncludeSearchPaths, "
|
||||
"projectIncludeSearchPaths, projectPartId FROM projectParts WHERE projectPartName = ?",
|
||||
"projectIncludeSearchPaths, projectPartId, language, languageVersion, languageExtension "
|
||||
"FROM projectParts WHERE projectPartName = ?",
|
||||
m_database};
|
||||
mutable ReadStatement m_getPrecompiledHeader{
|
||||
"SELECT projectPchPath, projectPchBuildTime FROM precompiledHeaders WHERE projectPartId = ?",
|
||||
|
||||
@@ -68,7 +68,8 @@ public:
|
||||
bool isAlreadyParsed(clang::FileID fileId)
|
||||
{
|
||||
const clang::FileEntry *fileEntry = m_sourceManager->getFileEntryForID(fileId);
|
||||
|
||||
if (!fileEntry)
|
||||
return false;
|
||||
return m_sourcesManager.alreadyParsed(filePathId(fileEntry),
|
||||
fileEntry->getModificationTime());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user