[gnome-builder/wip/libide: 165/237] libide: diagnostics indexes are 0 based



commit e9a67adc30f04e45851ef2b375d32a82923e71fe
Author: Christian Hergert <christian hergert me>
Date:   Thu Feb 12 19:20:25 2015 -0800

    libide: diagnostics indexes are 0 based

 libide/clang/ide-clang-translation-unit.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libide/clang/ide-clang-translation-unit.c b/libide/clang/ide-clang-translation-unit.c
index d693b6e..4fe0ade 100644
--- a/libide/clang/ide-clang-translation-unit.c
+++ b/libide/clang/ide-clang-translation-unit.c
@@ -130,6 +130,9 @@ create_location (IdeClangTranslationUnit *self,
 
   clang_getFileLocation (cxloc, &cxfile, &line, &column, &offset);
 
+  if (line > 0) line--;
+  if (column > 0) column--;
+
   str = clang_getFileName (cxfile);
   path = get_path (workpath, clang_getCString (str));
   clang_disposeString (str);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]