Commit 0672d873 authored by hjk's avatar hjk Committed by hjk
Browse files

preprocessor: concatenate tokens need to preserve previous whitespace



Change-Id: Ibca5737ad906c1db7e1bf4e15e5c92030e87c0bb
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent c908a4b9
......@@ -1549,7 +1549,9 @@ PPToken Preprocessor::generateConcatenated(const PPToken &leftTk, const PPToken
newText.reserve(leftTk.length() + rightTk.length());
newText.append(leftTk.tokenStart(), leftTk.length());
newText.append(rightTk.tokenStart(), rightTk.length());
return generateToken(T_IDENTIFIER, newText.constData(), newText.size(), leftTk.lineno, true);
PPToken result = generateToken(T_IDENTIFIER, newText.constData(), newText.size(), leftTk.lineno, true);
result.f.whitespace = leftTk.f.whitespace;
return result;
}
void Preprocessor::startSkippingBlocks(const Preprocessor::PPToken &tk) const
......
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