diff options
| author | Orgad Shaneh <[email protected]> | 2014-02-20 22:14:18 +0200 |
|---|---|---|
| committer | Orgad Shaneh <[email protected]> | 2014-02-27 20:55:58 +0100 |
| commit | b41b25a3f7a765bfbbc339f8cffba745bcfa84d0 (patch) | |
| tree | ea5f41c74cba835afaa44fb87a0b68e8b274e5e7 /src/libs/cplusplus/pp-engine.cpp | |
| parent | e4c2f569a8bb5dddec42f08023caf7614d55578b (diff) | |
C++: Fix line value for tokens generated by function-like macro
baseLine is used for generating new tokens, which are
later added m_state.m_lineRef - 1 again
Change-Id: I33928a90988e8d4c317ae460647f16f87da5b155
Reviewed-by: Nikolai Kosjar <[email protected]>
Diffstat (limited to 'src/libs/cplusplus/pp-engine.cpp')
| -rw-r--r-- | src/libs/cplusplus/pp-engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 41439ad7904..d7f327f3e76 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -969,7 +969,7 @@ bool Preprocessor::handleIdentifier(PPToken *tk) // their corresponding argument in macro substitution. For expanded tokens which are // generated, this information must be taken from somewhere else. What we do is to keep // a "reference" line initialize set to the line where expansion happens. - unsigned baseLine = idTk.lineno; + unsigned baseLine = idTk.lineno - m_state.m_lineRef + 1; QVector<PPToken> body = macro->definitionTokens(); |
