Fix off-by-two error printing diagnostics

llvm-svn: 38565
This commit is contained in:
Chris Lattner 2006-06-24 21:29:50 +00:00
parent e60165fdb5
commit 4da3a353b6

View File

@ -148,7 +148,7 @@ void DiagnosticPrinterSTDERR::HandleDiagnostic(Diagnostic::Level Level,
// Compute the column number. Rewind from the current position to the start
// of the line.
ColNo = SourceMgr.getColumnNumber(Pos);
LineStart = FilePos-ColNo-1; // Column # is 1-based
LineStart = FilePos-ColNo+1; // Column # is 1-based
// Compute the line end. Scan forward from the error position to the end of
// the line.