preprocessor: concatenate tokens need to preserve previous whitespace

Change-Id: Ibca5737ad906c1db7e1bf4e15e5c92030e87c0bb
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
hjk
2012-04-27 17:11:16 +02:00
committed by hjk
parent c908a4b9e6
commit 0672d873d0

View File

@@ -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