Commit b41b25a3 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

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: default avatarNikolai Kosjar <>
parent e4c2f569
......@@ -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();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment