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:
@@ -127,7 +127,7 @@ public:
|
||||
unsigned *column = 0,
|
||||
const StringLiteral **fileName = 0) const;
|
||||
|
||||
void getPosition(unsigned offset,
|
||||
void getPosition(unsigned utf16charOffset,
|
||||
unsigned *line,
|
||||
unsigned *column = 0,
|
||||
const StringLiteral **fileName = 0) const;
|
||||
@@ -172,8 +172,8 @@ private:
|
||||
};
|
||||
|
||||
void releaseTokensAndComments();
|
||||
unsigned findLineNumber(unsigned offset) const;
|
||||
unsigned findColumnNumber(unsigned offset, unsigned lineNumber) const;
|
||||
unsigned findLineNumber(unsigned utf16charOffset) const;
|
||||
unsigned findColumnNumber(unsigned utf16CharOffset, unsigned lineNumber) const;
|
||||
PPLine findPreprocessorLine(unsigned offset) const;
|
||||
void showErrorLine(unsigned index, unsigned column, FILE *out);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user