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:
@@ -2626,9 +2626,7 @@ static CPlusPlus::Document::Ptr getParsedDocument(const QString &fileName,
|
||||
src = QString::fromLocal8Bit(reader.data()); // ### FIXME encoding
|
||||
}
|
||||
|
||||
QByteArray source = snapshot.preprocessedCode(src, fileName);
|
||||
|
||||
CPlusPlus::Document::Ptr doc = snapshot.documentFromSource(source, fileName);
|
||||
CPlusPlus::Document::Ptr doc = snapshot.preprocessedDocument(src, fileName);
|
||||
doc->parse();
|
||||
return doc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user