From 0d9bf5e54308ee05c8e8da011c09b845c1d1297e Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Wed, 15 May 2013 11:45:30 +0200 Subject: 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 82e347095c4bdb7a6419d28798639e60591e3992 C++: Untangle include file resolving from loading. Task-number: QTCREATORBUG-9205 Change-Id: Iea57b7c59ea04a3c8843fd1291f4c375382958fc Reviewed-by: Erik Verbruggen --- src/plugins/cpptools/cpppreprocessor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/cpptools/cpppreprocessor.cpp') diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp index 5ab1c9a04e..5c5d1bd803 100644 --- a/src/plugins/cpptools/cpppreprocessor.cpp +++ b/src/plugins/cpptools/cpppreprocessor.cpp @@ -138,6 +138,7 @@ void CppPreprocessor::resetEnvironment() { m_env.reset(); m_processed.clear(); + m_included.clear(); } void CppPreprocessor::getFileContents(const QString &absoluteFilePath, -- cgit v1.2.1