forked from qt-creator/qt-creator
Clang: Use line and column instead of offset for diagnostics
Offsets can be get wrong because of the utf8 <-> utf16 differences. Line and columns are not that sensitive to it. Change-Id: I2e3e8c000621b6d694a4ada6df176f29427794f5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
a4231de01c
commit
19d9dc0ce3
@@ -67,7 +67,7 @@ uint SourceLocation::offset() const
|
||||
|
||||
SourceLocationContainer SourceLocation::toSourceLocationContainer() const
|
||||
{
|
||||
return SourceLocationContainer(filePath_, line_, offset_);
|
||||
return SourceLocationContainer(filePath_, line_, column_);
|
||||
}
|
||||
|
||||
SourceLocation::SourceLocation(CXSourceLocation cxSourceLocation)
|
||||
@@ -94,7 +94,8 @@ SourceLocation::SourceLocation(CXTranslationUnit cxTranslationUnit,
|
||||
line,
|
||||
column)),
|
||||
filePath_(filePath),
|
||||
line_(line)
|
||||
line_(line),
|
||||
column_(column)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user