forked from qt-creator/qt-creator
Clang: Fix SourceLocation column recalculation
Fix column conversion according to the fact that columns are 1-based. Change-Id: I75e9b966d96b9bb7648822b564e57f8838ebb3f8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -102,7 +102,7 @@ SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit,
|
||||
// (2) column in Clang is the utf8 byte offset from the beginning of the line.
|
||||
// Here we convert column from (2) to (1).
|
||||
column_ = static_cast<uint>(QString::fromUtf8(&contents[lineStart],
|
||||
static_cast<int>(column_)).size());
|
||||
static_cast<int>(column_) - 1).size()) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user