forked from qt-creator/qt-creator
C++: Fix outdated macro usage info in documents.
Record revisions of documents in macro definitions and usages. Then, when searching for usages, check the revision of the documents against the revision of the macros. If they are out-of-sync, repreprocess the documents to get up-to-date info. Task-number: QTCREATORBUG-7872 Change-Id: I846bb52ec660024728ab117a9fb7e43382a50e63 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -156,8 +156,7 @@ Document::Ptr CppRefactoringFile::cppDocument() const
|
||||
const QString name = fileName();
|
||||
const Snapshot &snapshot = data()->m_snapshot;
|
||||
|
||||
const QByteArray contents = snapshot.preprocessedCode(source, name);
|
||||
m_cppDocument = snapshot.documentFromSource(contents, name);
|
||||
m_cppDocument = snapshot.preprocessedDocument(source, name);
|
||||
m_cppDocument->check();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user