forked from qt-creator/qt-creator
Clang: fix utf8 related column numbers
Use new clang_getFileContents to efficiently convert utf8 byte offsets from line start to column numbers. Also provide simplier backwards convertion to pass resulting utf8 offset to clang. Task-number: QTCREATORBUG-16941 Change-Id: If0e58fe01ad3e281b7e952e972b9e86f6e75aadb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -40,7 +40,7 @@ class SourceRange
|
||||
|
||||
public:
|
||||
SourceRange();
|
||||
SourceRange(CXSourceRange cxSourceRange);
|
||||
SourceRange(CXTranslationUnit cxTranslationUnit, CXSourceRange cxSourceRange);
|
||||
SourceRange(const SourceLocation &start, const SourceLocation &end);
|
||||
|
||||
bool isNull() const;
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
|
||||
private:
|
||||
CXSourceRange cxSourceRange;
|
||||
CXTranslationUnit cxTranslationUnit = nullptr;
|
||||
};
|
||||
|
||||
bool operator==(const SourceRange &first, const SourceRange &second);
|
||||
|
||||
Reference in New Issue
Block a user