[gnome-builder] libide: diagnostics indexes are 0 based
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: diagnostics indexes are 0 based
- Date: Mon, 23 Mar 2015 23:30:45 +0000 (UTC)
commit 725a64c0c9e79043a5d2cb7c870a04840c9611dc
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]