From 8c032ee7a6ec75d803b52465f24c41d4befb7e37 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 12 Apr 2020 17:22:37 +0200
Subject: [PATCH] Fix compatibility with LLVM/Clang 10

---
 CMakeLists.txt            | 2 +-
 generator/codefactory.cpp | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61eacb1..da39380 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,7 +11,7 @@ set(META_APP_CATEGORIES "Utility;")
 set(META_GUI_OPTIONAL false)
 set(META_VERSION_MAJOR 0)
 set(META_VERSION_MINOR 0)
-set(META_VERSION_PATCH 13)
+set(META_VERSION_PATCH 14)
 set(META_APP_VERSION ${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH})
 set(META_CXX_STANDARD 17)
 set(META_ADD_DEFAULT_CPP_UNIT_TEST_APPLICATION ON)
diff --git a/generator/codefactory.cpp b/generator/codefactory.cpp
index 3924de5..45e8f00 100644
--- a/generator/codefactory.cpp
+++ b/generator/codefactory.cpp
@@ -1,3 +1,4 @@
+#include "./clangversionabstraction.h"
 #include "./codefactory.h"
 #include "./frontendaction.h"
 
@@ -20,7 +21,7 @@ struct CodeFactory::ToolInvocation {
 
 CodeFactory::ToolInvocation::ToolInvocation(CodeFactory &factory)
     : fileManager({ "." })
-    , invocation(factory.makeClangArgs(), new FrontendAction(factory), &fileManager)
+    , invocation(factory.makeClangArgs(), maybe_unique(new FrontendAction(factory)), &fileManager)
 {
     fileManager.Retain();
 }