forked from qt-creator/qt-creator
C++: TranslationUnit::getPosition takes utf16char offsets
...and not byte offsets anymore. This is necessary in order to calculate the line and column numbers correctly with respect to unicode code points. Change-Id: I5d79857b3eaefeb8d563b4f1e3938a64debc5e08 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
2
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
2
src/libs/3rdparty/cplusplus/Lexer.cpp
vendored
@@ -109,7 +109,7 @@ void Lexer::pushLineStartOffset()
|
||||
++_currentLine;
|
||||
|
||||
if (_translationUnit)
|
||||
_translationUnit->pushLineOffset(_currentChar - _firstChar);
|
||||
_translationUnit->pushLineOffset(_currentCharUtf16);
|
||||
}
|
||||
|
||||
void Lexer::scan(Token *tok)
|
||||
|
||||
Reference in New Issue
Block a user