Fix out-of-memory crash when indenting generated tokens.
Generated tokens do not have a position in any source file, so not try to indent them. Previously, the 'source' used was the scratch buffer, which would not contain newlines, so the indent depth would be the length of the scratch buffer at that point. Task-number: QTCREATORBUG-7262 Change-Id: If94213d6dffd13dd2b47c7038ec2398ad925d904 Reviewed-by:Yuchen Deng <loaden@gmail.com> Reviewed-by:
Thomas Hartmann <Thomas.Hartmann@nokia.com>
Showing
- src/libs/cplusplus/PPToken.h 5 additions, 2 deletionssrc/libs/cplusplus/PPToken.h
- src/libs/cplusplus/pp-engine.cpp 15 additions, 7 deletionssrc/libs/cplusplus/pp-engine.cpp
- tests/auto/cplusplus/preprocessor/data/identifier-expansion.3.out.cpp 1 addition, 1 deletion...plusplus/preprocessor/data/identifier-expansion.3.out.cpp
Loading
Please register or sign in to comment