C++: Fix 'already seen files' when indexing

Resetting the environment (after each *.cpp file) did not clear the
already seen files (m_included). Because of that the succeeding header
files were not parsed correctly - the environments of the mistakenly
already seen header files were not merged in.

Note that this change slow downs the parsing/indexing of files to its
original speed, as it was before the problematic commit (and it is in
2.7):

    commit 82e347095c
    C++: Untangle include file resolving from loading.

Task-number: QTCREATORBUG-9205
Change-Id: Iea57b7c59ea04a3c8843fd1291f4c375382958fc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-05-15 11:45:30 +02:00
parent 3e80f52414
commit 0d9bf5e543
6 changed files with 164 additions and 3 deletions

View File

@@ -138,6 +138,7 @@ void CppPreprocessor::resetEnvironment()
{
m_env.reset();
m_processed.clear();
m_included.clear();
}
void CppPreprocessor::getFileContents(const QString &absoluteFilePath,