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:
Marco Bubke
2015-12-02 20:07:29 +01:00
committed by Nikolai Kosjar
parent a4231de01c
commit 19d9dc0ce3
11 changed files with 179 additions and 62 deletions

View File

@@ -34,9 +34,16 @@
#include <texteditor/quickfix.h>
#include <clangbackendipc/fixitcontainer.h>
#include <utils/changeset.h>
#include <QVector>
#include <QSharedPointer>
namespace TextEditor
{
class RefactoringFile;
}
namespace ClangCodeModel {
@@ -51,11 +58,15 @@ public:
QString description() const override;
void perform() override;
QString refactoringFileContent_forTestOnly() const;
private:
Utils::ChangeSet changeSet() const;
private:
Utf8String filePath;
Utf8String fixItText;
QSharedPointer<TextEditor::RefactoringFile> refactoringFile;
QVector<ClangBackEnd::FixItContainer> fixItContainers;
};