diff options
author | Erik Verbruggen <[email protected]> | 2012-10-11 16:16:01 +0200 |
---|---|---|
committer | Erik Verbruggen <[email protected]> | 2012-10-15 10:58:07 +0200 |
commit | f3faef5a1e345b02dfca0b8c682e5e36e318849f (patch) | |
tree | 747ecc0a7a6b9d574ceff130767f386ee80b4a76 /src/libs/cplusplus/pp-engine.cpp | |
parent | 199b243bca769049095b72bf5af7e95add1ecff6 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/pp-engine.cpp')
-rw-r--r-- | src/libs/cplusplus/pp-engine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index c2d104ae6ea..3564cc11c45 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -812,6 +812,9 @@ bool Preprocessor::handleIdentifier(PPToken *tk) if (!expandFunctionlikeMacros() // Still expand if this originally started with an object-like macro. && m_state.m_expansionStatus != Expanding) { + m_client->notifyMacroReference(m_state.m_offsetRef + idTk.offset, + idTk.lineno, + *macro); return false; } |