[gnome-builder] libide: specify file when building translation unit
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: specify file when building translation unit
- Date: Mon, 23 Mar 2015 23:48:02 +0000 (UTC)
commit 7bb374a875c1c5a8d22697be83d20d108f245d4e
Author: Christian Hergert <christian hergert me>
Date: Sun Mar 1 18:26:48 2015 -0800
libide: specify file when building translation unit
This let's us drop a bunch of extraneous warnings from the TU that we
do not need to display in the editor.
libide/clang/ide-clang-private.h | 1 +
libide/clang/ide-clang-service.c | 4 +++-
libide/ide-internal.h | 4 ----
3 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/libide/clang/ide-clang-private.h b/libide/clang/ide-clang-private.h
index cdc50b0..1ce5da4 100644
--- a/libide/clang/ide-clang-private.h
+++ b/libide/clang/ide-clang-private.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
IdeClangTranslationUnit *_ide_clang_translation_unit_new (IdeContext *context,
CXTranslationUnit tu,
+ GFile *file,
gint64 sequence);
G_END_DECLS
diff --git a/libide/clang/ide-clang-service.c b/libide/clang/ide-clang-service.c
index 108bb1a..fd98270 100644
--- a/libide/clang/ide-clang-service.c
+++ b/libide/clang/ide-clang-service.c
@@ -74,6 +74,7 @@ ide_clang_service_parse_worker (GTask *task,
ParseRequest *request = task_data;
IdeContext *context;
const gchar * const *argv;
+ GFile *gfile;
gsize argc = 0;
const gchar *detail_error = NULL;
enum CXErrorCode code;
@@ -150,7 +151,8 @@ ide_clang_service_parse_worker (GTask *task,
}
context = ide_object_get_context (source_object);
- ret = _ide_clang_translation_unit_new (context, tu, request->sequence);
+ gfile = ide_file_get_file (request->file);
+ ret = _ide_clang_translation_unit_new (context, tu, gfile, request->sequence);
g_rw_lock_writer_lock (&self->cached_rwlock);
g_hash_table_replace (self->cached_units,
diff --git a/libide/ide-internal.h b/libide/ide-internal.h
index 01a5432..c37c33c 100644
--- a/libide/ide-internal.h
+++ b/libide/ide-internal.h
@@ -36,10 +36,6 @@ IdeUnsavedFile *_ide_unsaved_file_new (GFile *file,
const gchar *temp_path,
gint64 sequence);
-IdeClangTranslationUnit *_ide_clang_translation_unit_new (IdeContext *contxt,
- CXTranslationUnit tu,
- gint64 sequence);
-
void _ide_diagnostician_add_provider (IdeDiagnostician *self,
IdeDiagnosticProvider *provider);
void _ide_diagnostician_remove_provider (IdeDiagnostician *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]