forked from qt-creator/qt-creator
Clang: Properly apply fix-its from header files
Diagnostic may also include fix-its for the header which require different handling. Task-number: QTCREATORBUG-20517 Change-Id: I3e745622801be3fa2856d968b0c7a2a2aeb89b50 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -119,13 +119,14 @@ public:
|
||||
|
||||
const Debugger::DiagnosticLocation start = step.ranges.first();
|
||||
const Debugger::DiagnosticLocation end = step.ranges.last();
|
||||
const int startPos = file.position(start.line, start.column);
|
||||
const int endPos = file.position(end.line, end.column);
|
||||
const int startPos = file.position(start.filePath, start.line, start.column);
|
||||
const int endPos = file.position(start.filePath, end.line, end.column);
|
||||
|
||||
auto op = new ReplacementOperation;
|
||||
op->pos = startPos;
|
||||
op->length = endPos - startPos;
|
||||
op->text = step.message;
|
||||
op->fileName = start.filePath;
|
||||
op->apply = apply;
|
||||
|
||||
replacements += op;
|
||||
|
||||
Reference in New Issue
Block a user