Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ccls for openSUSE:Factory checked in at 2022-06-07 11:45:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ccls (Old) and /work/SRC/openSUSE:Factory/.ccls.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ccls" Tue Jun 7 11:45:01 2022 rev:15 rq:981023 version:0.20210330 Changes: -------- --- /work/SRC/openSUSE:Factory/ccls/ccls.changes 2021-05-06 22:53:19.730575900 +0200 +++ /work/SRC/openSUSE:Factory/.ccls.new.1548/ccls.changes 2022-06-07 11:45:09.395232560 +0200 @@ -1,0 +2,10 @@ +Sat Jun 4 13:28:49 UTC 2022 - Aaron Puchert <[email protected]> + +- Port back upstream patches to fix build with LLVM 14: + * llvm14-refactor-isIdentifierBody.patch + * llvm14-braced-constructor-call.patch + * llvm14-include-STLExtras.patch +- Fix build with older LLVMs by setting CLANG_LINK_CLANG_DYLIB=ON + only for versions >= 9. + +------------------------------------------------------------------- New: ---- llvm14-braced-constructor-call.patch llvm14-include-STLExtras.patch llvm14-refactor-isIdentifierBody.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ccls.spec ++++++ --- /var/tmp/diff_new_pack.GbrzzI/_old 2022-06-07 11:45:09.799233111 +0200 +++ /var/tmp/diff_new_pack.GbrzzI/_new 2022-06-07 11:45:09.803233117 +0200 @@ -1,7 +1,7 @@ # # spec file for package ccls # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,9 @@ Group: Development/Tools/IDE URL: https://github.com/MaskRay/ccls Source0: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: https://github.com/MaskRay/ccls/commit/3ce756e39ae48204f016a58684652ad62b4dd9f9.patch#/llvm14-refactor-isIdentifierBody.patch +Patch1: https://github.com/MaskRay/ccls/commit/8422f0a522b6fbcb4412a8ec73d80b4acbc7e00f.patch#/llvm14-braced-constructor-call.patch +Patch2: https://github.com/MaskRay/ccls/commit/790daca4b2d9d5873623fee86283cd61212df674.patch#/llvm14-include-STLExtras.patch BuildRequires: clang-devel >= 7.0 BuildRequires: cmake >= 3.8 BuildRequires: llvm-devel >= 7.0 @@ -67,7 +70,12 @@ rm -rf third_party/rapidjson %build -%cmake -DUSE_SYSTEM_RAPIDJSON=ON -DCLANG_LINK_CLANG_DYLIB=on +%cmake -DUSE_SYSTEM_RAPIDJSON=ON \ +%if %{pkg_vcmp clang-devel >= 9.0.0} + -DCLANG_LINK_CLANG_DYLIB=ON +%else + -DCLANG_LINK_CLANG_DYLIB=OFF +%endif # ccls currently consumes ~1GB of memory during compilation per thread %cmake_build ++++++ llvm14-braced-constructor-call.patch ++++++ >From 8422f0a522b6fbcb4412a8ec73d80b4acbc7e00f Mon Sep 17 00:00:00 2001 From: Fangrui Song <[email protected]> Date: Sun, 9 Jan 2022 12:25:07 -0800 Subject: [PATCH] Adapt llvmorg-14-init-13600-g92417eaf3329: braced constructor call --- src/messages/textDocument_signatureHelp.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/messages/textDocument_signatureHelp.cc b/src/messages/textDocument_signatureHelp.cc index 8e8a7277f..4192272a6 100644 --- a/src/messages/textDocument_signatureHelp.cc +++ b/src/messages/textDocument_signatureHelp.cc @@ -80,6 +80,10 @@ class SignatureHelpConsumer : public CodeCompleteConsumer { #if LLVM_VERSION_MAJOR >= 8 , SourceLocation openParLoc +#endif +#if LLVM_VERSION_MAJOR >= 14 + , + bool braced #endif ) override { ls_sighelp.activeParameter = (int)currentArg; @@ -93,7 +97,11 @@ class SignatureHelpConsumer : public CodeCompleteConsumer { cand = OverloadCandidate(pattern); const auto *ccs = +#if LLVM_VERSION_MAJOR >= 14 + cand.CreateSignatureString(currentArg, s, *alloc, cCTUInfo, true, braced); +#else cand.CreateSignatureString(currentArg, s, *alloc, cCTUInfo, true); +#endif const char *ret_type = nullptr; SignatureInformation &ls_sig = ls_sighelp.signatures.emplace_back(); ++++++ llvm14-include-STLExtras.patch ++++++ >From 790daca4b2d9d5873623fee86283cd61212df674 Mon Sep 17 00:00:00 2001 From: Fangrui Song <[email protected]> Date: Sun, 30 Jan 2022 11:17:32 -0800 Subject: [PATCH] query: include llvm/ADT/STLExtras.h The header is no longer transitively included in 2022-01. --- src/query.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/query.cc b/src/query.cc index c7bfcfe34..544149c4d 100644 --- a/src/query.cc +++ b/src/query.cc @@ -9,6 +9,8 @@ #include <rapidjson/document.h> +#include <llvm/ADT/STLExtras.h> + #include <assert.h> #include <functional> #include <limits.h> ++++++ llvm14-refactor-isIdentifierBody.patch ++++++ >From 3ce756e39ae48204f016a58684652ad62b4dd9f9 Mon Sep 17 00:00:00 2001 From: Fangrui Song <[email protected]> Date: Thu, 23 Sep 2021 13:36:01 -0700 Subject: [PATCH] Adaopt llvmorg-14-init-3863-g601102d282d5: refactor clang::isIdentifierBody --- src/clang_tu.hh | 4 ++++ src/indexer.cc | 6 +++--- src/working_files.cc | 9 ++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/clang_tu.hh b/src/clang_tu.hh index b37950926..7dbfc4a88 100644 --- a/src/clang_tu.hh +++ b/src/clang_tu.hh @@ -17,6 +17,10 @@ namespace vfs = clang::vfs; } #endif +#if LLVM_VERSION_MAJOR < 14 // llvmorg-14-init-3863-g601102d282d5 +#define isAsciiIdentifierContinue isIdentifierBody +#endif + namespace ccls { std::string pathFromFileEntry(const clang::FileEntry &file); diff --git a/src/indexer.cc b/src/indexer.cc index 89d78959e..644c0ccbb 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -527,8 +527,8 @@ class IndexDataConsumer : public index::IndexDataConsumer { auto i = name.find(short_name); if (short_name.size()) while (i != std::string::npos && - ((i && isIdentifierBody(name[i - 1])) || - isIdentifierBody(name[i + short_name.size()]))) + ((i && isAsciiIdentifierContinue(name[i - 1])) || + isAsciiIdentifierContinue(name[i + short_name.size()]))) i = name.find(short_name, i + short_name.size()); if (i == std::string::npos) { // e.g. operator type-parameter-1 @@ -552,7 +552,7 @@ class IndexDataConsumer : public index::IndexDataConsumer { paren++; else if (name[i - 1] == '(') paren--; - else if (!(paren > 0 || isIdentifierBody(name[i - 1]) || + else if (!(paren > 0 || isAsciiIdentifierContinue(name[i - 1]) || name[i - 1] == ':')) break; } diff --git a/src/working_files.cc b/src/working_files.cc index f80f21053..4904388be 100644 --- a/src/working_files.cc +++ b/src/working_files.cc @@ -342,7 +342,10 @@ std::optional<int> WorkingFile::getIndexPosFromBufferPos(int line, int *column, Position WorkingFile::getCompletionPosition(Position pos, std::string *filter) const { int start = getOffsetForPosition(pos, buffer_content); int i = start; - while (i > 0 && isIdentifierBody(buffer_content[i - 1])) +#if LLVM_VERSION_MAJOR < 14 // llvmorg-14-init-3863-g601102d282d5 +#define isAsciiIdentifierContinue isIdentifierBody +#endif + while (i > 0 && isAsciiIdentifierContinue(buffer_content[i - 1])) --i; *filter = buffer_content.substr(i, start - i); return getPositionForOffset(buffer_content, i); @@ -455,10 +458,10 @@ std::string_view lexIdentifierAroundPos(Position position, c = content[start - 1]; if (c == ':' && start > 1 && content[start - 2] == ':') start--; - else if (!isIdentifierBody(c)) + else if (!isAsciiIdentifierContinue(c)) break; } - for (; end < content.size() && isIdentifierBody(content[end]); end++) + for (; end < content.size() && isAsciiIdentifierContinue(content[end]); end++) ; return content.substr(start, end - start);
