File Create-preamble-only-on-second-parse.patch of Package kdevelop5

From 8e6bc21355a80d0f7bc73dc326696de0b608ef42 Mon Sep 17 00:00:00 2001
From: Aaron Puchert <aaronpuchert@alice-dsl.net>
Date: Sat, 26 Jan 2019 16:19:37 +0100
Subject: [PATCH] clang: Create preamble only on second parse

Summary:
Instead of creating preambles for all files in a project, we only create
them when a translation unit is parsed for a second time, usually
because it's edited. The serialization of the preamble takes time, and
probably doesn't make sense when we throwing it away soon after without
using it again.

Test Plan:
The initial parsing of a project doesn't create any preamble files
anymore, but they appear when files are edited.

Reviewers: #kdevelop, mwolff, brauch

Subscribers: kdevelop-devel

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D18551
---
 plugins/clang/duchain/parsesession.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/plugins/clang/duchain/parsesession.cpp b/plugins/clang/duchain/parsesession.cpp
index b55e7ba7e6..258597bed7 100644
--- a/plugins/clang/duchain/parsesession.cpp
+++ b/plugins/clang/duchain/parsesession.cpp
@@ -220,9 +220,6 @@ ParseSessionData::ParseSessionData(const QVector<UnsavedFile>& unsavedFiles, Cla
     }
     if (options.testFlag(OpenedInEditor)) {
         flags |= CXTranslationUnit_CacheCompletionResults
-#if CINDEX_VERSION_MINOR >= 32
-              |  CXTranslationUnit_CreatePreambleOnFirstParse
-#endif
               |  CXTranslationUnit_PrecompiledPreamble;
     }
 
-- 
2.25.0

openSUSE Build Service is sponsored by