[cfe-commits] r38565 - /cfe/cfe/trunk/Driver/clang.cpp

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:22:43 PDT 2007


Author: sabre
Date: Wed Jul 11 11:22:42 2007
New Revision: 38565

URL: http://llvm.org/viewvc/llvm-project?rev=38565&view=rev
Log:
Fix off-by-two error printing diagnostics

Modified:
    cfe/cfe/trunk/Driver/clang.cpp

Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=38565&r1=38564&r2=38565&view=diff

==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:22:42 2007
@@ -148,7 +148,7 @@
     // 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.





More information about the cfe-commits mailing list