[gnome-builder] clang: check for KeepGoing availability
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] clang: check for KeepGoing availability
- Date: Tue, 24 Oct 2017 21:00:55 +0000 (UTC)
commit 6f3a977577e8fc104455b94b14d353ae92e3e404
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 24 13:59:24 2017 -0700
clang: check for KeepGoing availability
If we are on older clang, we might not have access to the
CXTranslationUnit_KeepGoing flag. This adds a simple version
check to when we know it was added to the header.
src/plugins/clang/ide-clang-service.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/clang/ide-clang-service.c b/src/plugins/clang/ide-clang-service.c
index 90e9be0..b71528a 100644
--- a/src/plugins/clang/ide-clang-service.c
+++ b/src/plugins/clang/ide-clang-service.c
@@ -499,9 +499,11 @@ ide_clang_service_get_translation_unit_worker (DzlTaskCache *cache,
* quality highlighting, I'm going try try enabling it for now and see how
* things go.
*/
- request->options = (clang_defaultEditingTranslationUnitOptions () |
- CXTranslationUnit_DetailedPreprocessingRecord |
- CXTranslationUnit_KeepGoing);
+ request->options = (clang_defaultEditingTranslationUnitOptions ()
+#if CINDEX_VERSION >= CINDEX_VERSION_ENCODE(0, 35)
+ | CXTranslationUnit_KeepGoing
+#endif
+ | CXTranslationUnit_DetailedPreprocessingRecord);
real_task = g_task_new (self,
g_task_get_cancellable (task),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]