C++: do not strip trailing newlines in the preprocessor output.
Doing so resulted in an incorrect position for the EOF token when the
preprocessed output would be parsed. That in turn leads to incorrect
insertion positions for refactoring actions.
This is especially true when a file contains only preprocessor
directives: the EOF token would point to line 1 column 1, which is
usually not the place where code should be inserted.
Change-Id: I7d359aa7a6c04bc52c8b873fd49ad6afc3a77319
Reviewed-by:
hjk <hjk121@nokiamail.com>
Showing
- src/libs/cplusplus/pp-engine.cpp 0 additions, 15 deletionssrc/libs/cplusplus/pp-engine.cpp
- src/libs/cplusplus/pp-engine.h 0 additions, 1 deletionsrc/libs/cplusplus/pp-engine.h
- src/plugins/cppeditor/cppquickfix_test.cpp 10 additions, 10 deletionssrc/plugins/cppeditor/cppquickfix_test.cpp
- tests/auto/cplusplus/preprocessor/data/empty-macro.2.cpp 0 additions, 1 deletiontests/auto/cplusplus/preprocessor/data/empty-macro.2.cpp
- tests/auto/cplusplus/preprocessor/data/identifier-expansion.5.out.cpp 8 additions, 0 deletions...plusplus/preprocessor/data/identifier-expansion.5.out.cpp
- tests/auto/cplusplus/preprocessor/data/macro-test.out.cpp 5 additions, 0 deletionstests/auto/cplusplus/preprocessor/data/macro-test.out.cpp
- tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp 78 additions, 2 deletionstests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
Loading
Please register or sign in to comment