2020-06-12 20:34:22 |
Gianfranco Costamagna |
description |
I find this package FTBFS in focal, because llvm-defaults is updated to 10.
https://launchpad.net/ubuntu/+source/ccls/0.20190823.5-1build1
The new version in Debian(sid) can fix this.
How does the SRU procedure work? Is this upstream microrelease suite for SRU?
The diff looks quite minimal.
```
diff -Nru ccls-0.20190823.5/debian/changelog ccls-0.20190823.6/debian/changelog
--- ccls-0.20190823.5/debian/changelog 2019-11-13 00:25:32.000000000 +0800
+++ ccls-0.20190823.6/debian/changelog 2020-04-22 15:03:08.000000000 +0800
@@ -1,3 +1,11 @@
+ccls (0.20190823.6-1) unstable; urgency=medium
+
+ * New upstream release 0.20190823.6
+ * Update Standards-Version to 4.5.0 (no changes)
+ * Run ccls index in autopkgtest
+
+ -- Shengjing Zhu <zhsj@debian.org> Wed, 22 Apr 2020 15:03:08 +0800
+
ccls (0.20190823.5-1) unstable; urgency=medium
* New upstream release 0.20190823.5
diff -Nru ccls-0.20190823.5/debian/control ccls-0.20190823.6/debian/control
--- ccls-0.20190823.5/debian/control 2019-11-13 00:25:32.000000000 +0800
+++ ccls-0.20190823.6/debian/control 2020-04-22 15:03:08.000000000 +0800
@@ -11,7 +11,7 @@
llvm-dev,
python3 <!nocheck>,
rapidjson-dev,
-Standards-Version: 4.4.1
+Standards-Version: 4.5.0
Homepage: https://github.com/MaskRay/ccls
Vcs-Browser: https://salsa.debian.org/zhsj/ccls
Vcs-Git: https://salsa.debian.org/zhsj/ccls.git
diff -Nru ccls-0.20190823.5/debian/tests/lsp-test ccls-0.20190823.6/debian/tests/lsp-test
--- ccls-0.20190823.5/debian/tests/lsp-test 2019-11-13 00:25:32.000000000 +0800
+++ ccls-0.20190823.6/debian/tests/lsp-test 2020-04-22 15:03:08.000000000 +0800
@@ -7,7 +7,7 @@
import subprocess
import time
-
+ccls = os.getenv("CCLS", "ccls")
path = os.path.dirname(os.path.realpath(__file__))
tests = [
@@ -118,17 +118,17 @@
return json.loads(f.read(size).decode())
+subprocess.run([ccls, "-index=."], stderr=subprocess.STDOUT).check_returncode()
+
with subprocess.Popen(
- [os.getenv("CCLS", "ccls"), "-v=-1"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
+ [ccls, "-v=-1"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
) as proc:
for tt in tests:
method = tt[0]["method"]
print("Testing", method)
proc.stdin.write(encode(tt[0]))
proc.stdin.flush()
- if method == "initialize":
- # wait for ccls to finish indexing
- time.sleep(2)
+ time.sleep(1)
got = read(proc.stdout)
if not tt[1] == got:
print("Expect:")
diff -Nru ccls-0.20190823.5/src/clang_tu.cc ccls-0.20190823.6/src/clang_tu.cc
--- ccls-0.20190823.5/src/clang_tu.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/clang_tu.cc 2020-04-22 15:02:27.000000000 +0800
@@ -8,6 +8,7 @@
#include <clang/AST/Type.h>
#include <clang/Lex/Lexer.h>
+#include <llvm/Support/Host.h>
#include <llvm/Support/Path.h>
using namespace clang;
diff -Nru ccls-0.20190823.5/src/filesystem.cc ccls-0.20190823.6/src/filesystem.cc
--- ccls-0.20190823.5/src/filesystem.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/filesystem.cc 2020-04-22 15:02:27.000000000 +0800
@@ -31,7 +31,8 @@
curr.pop_back();
for (sys::fs::directory_iterator i(folder1, ec, false), e; i != e && !ec;
i.increment(ec)) {
- std::string path = i->path(), filename = sys::path::filename(path);
+ std::string path = i->path();
+ std::string filename(sys::path::filename(path));
if ((filename[0] == '.' && filename != ".ccls") ||
sys::fs::status(path, status, false))
continue;
diff -Nru ccls-0.20190823.5/src/indexer.cc ccls-0.20190823.6/src/indexer.cc
--- ccls-0.20190823.5/src/indexer.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/indexer.cc 2020-04-22 15:02:27.000000000 +0800
@@ -10,6 +10,7 @@
#include "sema_manager.hh"
#include <clang/AST/AST.h>
+#include <clang/Basic/TargetInfo.h>
#include <clang/Frontend/FrontendAction.h>
#include <clang/Frontend/MultiplexConsumer.h>
#include <clang/Index/IndexDataConsumer.h>
@@ -508,7 +509,7 @@
llvm::raw_svector_ostream os(str);
d->print(os, getDefaultPolicy());
- std::string name = os.str();
+ std::string name(str.data(), str.size());
simplifyAnonymous(name);
// Remove \n in DeclPrinter.cpp "{\n" + if(!TerseOutput)something + "}"
for (std::string::size_type i = 0;;) {
@@ -677,10 +678,13 @@
public:
IndexDataConsumer(IndexParam ¶m) : param(param) {}
void initialize(ASTContext &ctx) override { this->ctx = param.ctx = &ctx; }
- bool handleDeclOccurence(const Decl *d, index::SymbolRoleSet roles,
- ArrayRef<index::SymbolRelation> relations,
- SourceLocation src_loc,
- ASTNodeInfo ast_node) override {
+#if LLVM_VERSION_MAJOR < 10 // llvmorg-10-init-12036-g3b9715cb219
+# define handleDeclOccurrence handleDeclOccurence
+#endif
+ bool handleDeclOccurrence(const Decl *d, index::SymbolRoleSet roles,
+ ArrayRef<index::SymbolRelation> relations,
+ SourceLocation src_loc,
+ ASTNodeInfo ast_node) override {
if (!param.no_linkage) {
if (auto *nd = dyn_cast<NamedDecl>(d); nd && nd->hasLinkage())
;
diff -Nru ccls-0.20190823.5/src/main.cc ccls-0.20190823.6/src/main.cc
--- ccls-0.20190823.5/src/main.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/main.cc 2020-04-22 15:02:27.000000000 +0800
@@ -140,7 +140,7 @@
if (opt_index.size()) {
SmallString<256> root(opt_index);
sys::fs::make_absolute(root);
- pipeline::standalone(root.str());
+ pipeline::standalone(std::string(root.data(), root.size()));
} else {
// The thread that reads from stdin and dispatchs commands to the main
// thread.
diff -Nru ccls-0.20190823.5/src/pipeline.cc ccls-0.20190823.6/src/pipeline.cc
--- ccls-0.20190823.5/src/pipeline.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/pipeline.cc 2020-04-22 15:02:27.000000000 +0800
@@ -113,7 +113,7 @@
}
// For inferred files, allow -o a a.cc -> -o b b.cc
- std::string stem = sys::path::stem(path);
+ StringRef stem = sys::path::stem(path);
int changed = -1, size = std::min(prev->args.size(), args.size());
for (int i = 0; i < size; i++)
if (strcmp(prev->args[i], args[i]) && sys::path::stem(args[i]) != stem) {
diff -Nru ccls-0.20190823.5/src/platform.hh ccls-0.20190823.6/src/platform.hh
--- ccls-0.20190823.5/src/platform.hh 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/platform.hh 2020-04-22 15:02:27.000000000 +0800
@@ -1,14 +1,14 @@
-// Copyright 2017-2018 ccls Authors
+// Copyright 2017-2020 ccls Authors
// SPDX-License-Identifier: Apache-2.0
#pragma once
+#include <llvm/ADT/StringRef.h>
+
#include <string>
-#include <string_view>
-#include <vector>
namespace ccls {
-std::string normalizePath(const std::string &path);
+std::string normalizePath(llvm::StringRef path);
// Free any unused memory and return it to the system.
void freeUnusedMemory();
diff -Nru ccls-0.20190823.5/src/platform_posix.cc ccls-0.20190823.6/src/platform_posix.cc
--- ccls-0.20190823.5/src/platform_posix.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/platform_posix.cc 2020-04-22 15:02:27.000000000 +0800
@@ -40,7 +40,7 @@
void threadEnter();
}
-std::string normalizePath(const std::string &path) {
+std::string normalizePath(llvm::StringRef path) {
llvm::SmallString<256> p(path);
llvm::sys::path::remove_dots(p, true);
return {p.data(), p.size()};
diff -Nru ccls-0.20190823.5/src/platform_win.cc ccls-0.20190823.6/src/platform_win.cc
--- ccls-0.20190823.5/src/platform_win.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/platform_win.cc 2020-04-22 15:02:27.000000000 +0800
@@ -19,17 +19,12 @@
#include <thread>
namespace ccls {
-std::string normalizePath(const std::string &path) {
- DWORD retval = 0;
+std::string normalizePath(llvm::StringRef path) {
TCHAR buffer[MAX_PATH] = TEXT("");
TCHAR **lpp_part = {NULL};
- std::string result;
- retval = GetFullPathName(path.c_str(), MAX_PATH, buffer, lpp_part);
- // fail, return original
- if (retval == 0)
- result = path;
- else
+ std::string result(path);
+ if (GetFullPathName(result.c_str(), MAX_PATH, buffer, lpp_part) != 0)
result = buffer;
std::replace(result.begin(), result.end(), '\\', '/');
diff -Nru ccls-0.20190823.5/src/project.cc ccls-0.20190823.6/src/project.cc
--- ccls-0.20190823.5/src/project.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/project.cc 2020-04-22 15:02:27.000000000 +0800
@@ -222,7 +222,7 @@
return {};
std::vector<const char *> args;
for (line_iterator i(*mbOrErr.get(), true, '#'), e; i != e; ++i) {
- std::string line = *i;
+ std::string line(*i);
doPathMapping(line);
args.push_back(intern(line));
}
@@ -632,7 +632,7 @@
void Project::indexRelated(const std::string &path) {
auto &gi = g_config->index;
GroupMatch match(gi.whitelist, gi.blacklist);
- std::string stem = sys::path::stem(path);
+ StringRef stem = sys::path::stem(path);
std::vector<const char *> args, extra_args;
for (const std::string &arg : g_config->clang.extraArgs)
extra_args.push_back(intern(arg));
diff -Nru ccls-0.20190823.5/src/sema_manager.cc ccls-0.20190823.6/src/sema_manager.cc
--- ccls-0.20190823.5/src/sema_manager.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/sema_manager.cc 2020-04-22 15:02:27.000000000 +0800
@@ -9,6 +9,7 @@
#include "pipeline.hh"
#include "platform.hh"
+#include <clang/Basic/TargetInfo.h>
#include <clang/Lex/PreprocessorOptions.h>
#include <clang/Sema/CodeCompleteConsumer.h>
#include <clang/Sema/Sema.h>
@@ -622,9 +623,10 @@
for (const Note &n : d.notes) {
SmallString<256> str(n.file);
llvm::sys::path::remove_dots(str, true);
- Location loc{DocumentUri::fromPath(str.str()),
- lsRange{{n.range.start.line, n.range.start.column},
- {n.range.end.line, n.range.end.column}}};
+ Location loc{
+ DocumentUri::fromPath(std::string(str.data(), str.size())),
+ lsRange{{n.range.start.line, n.range.start.column},
+ {n.range.end.line, n.range.end.column}}};
ls_diag.relatedInformation.push_back({loc, n.message});
}
} else {
diff -Nru ccls-0.20190823.5/src/serializer.cc ccls-0.20190823.6/src/serializer.cc
--- ccls-0.20190823.5/src/serializer.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/serializer.cc 2020-04-22 15:02:27.000000000 +0800
@@ -1,4 +1,4 @@
-// Copyright 2017-2018 ccls Authors
+// Copyright 2017-2020 ccls Authors
// SPDX-License-Identifier: Apache-2.0
#include "serializer.hh"
@@ -13,6 +13,7 @@
#include <llvm/ADT/CachedHashString.h>
#include <llvm/ADT/DenseSet.h>
+#include <llvm/Support/Allocator.h>
#include <mutex>
#include <stdexcept>
@@ -216,7 +217,7 @@
reflectMemberStart(vis);
REFLECT_MEMBER(line);
if (gTestOutputMode) {
- std::string basename = llvm::sys::path::filename(v.resolved_path);
+ std::string basename(llvm::sys::path::filename(v.resolved_path));
if (v.resolved_path[0] != '&')
basename = "&" + basename;
REFLECT_MEMBER2("resolved_path", basename);
``` |
[Impact]
* the package in the archive currently FTBFS with llvm-default to 10
[Test Case]
* dpkg-buildpackage it
[Regression Potential]
* minimal, the new release is fixing only this problem, and comes from Debian maintainer
[Other info]
I find this package FTBFS in focal, because llvm-defaults is updated to 10.
https://launchpad.net/ubuntu/+source/ccls/0.20190823.5-1build1
The new version in Debian(sid) can fix this.
How does the SRU procedure work? Is this upstream microrelease suite for SRU?
The diff looks quite minimal.
```
diff -Nru ccls-0.20190823.5/debian/changelog ccls-0.20190823.6/debian/changelog
--- ccls-0.20190823.5/debian/changelog 2019-11-13 00:25:32.000000000 +0800
+++ ccls-0.20190823.6/debian/changelog 2020-04-22 15:03:08.000000000 +0800
@@ -1,3 +1,11 @@
+ccls (0.20190823.6-1) unstable; urgency=medium
+
+ * New upstream release 0.20190823.6
+ * Update Standards-Version to 4.5.0 (no changes)
+ * Run ccls index in autopkgtest
+
+ -- Shengjing Zhu <zhsj@debian.org> Wed, 22 Apr 2020 15:03:08 +0800
+
ccls (0.20190823.5-1) unstable; urgency=medium
* New upstream release 0.20190823.5
diff -Nru ccls-0.20190823.5/debian/control ccls-0.20190823.6/debian/control
--- ccls-0.20190823.5/debian/control 2019-11-13 00:25:32.000000000 +0800
+++ ccls-0.20190823.6/debian/control 2020-04-22 15:03:08.000000000 +0800
@@ -11,7 +11,7 @@
llvm-dev,
python3 <!nocheck>,
rapidjson-dev,
-Standards-Version: 4.4.1
+Standards-Version: 4.5.0
Homepage: https://github.com/MaskRay/ccls
Vcs-Browser: https://salsa.debian.org/zhsj/ccls
Vcs-Git: https://salsa.debian.org/zhsj/ccls.git
diff -Nru ccls-0.20190823.5/debian/tests/lsp-test ccls-0.20190823.6/debian/tests/lsp-test
--- ccls-0.20190823.5/debian/tests/lsp-test 2019-11-13 00:25:32.000000000 +0800
+++ ccls-0.20190823.6/debian/tests/lsp-test 2020-04-22 15:03:08.000000000 +0800
@@ -7,7 +7,7 @@
import subprocess
import time
-
+ccls = os.getenv("CCLS", "ccls")
path = os.path.dirname(os.path.realpath(__file__))
tests = [
@@ -118,17 +118,17 @@
return json.loads(f.read(size).decode())
+subprocess.run([ccls, "-index=."], stderr=subprocess.STDOUT).check_returncode()
+
with subprocess.Popen(
- [os.getenv("CCLS", "ccls"), "-v=-1"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
+ [ccls, "-v=-1"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
) as proc:
for tt in tests:
method = tt[0]["method"]
print("Testing", method)
proc.stdin.write(encode(tt[0]))
proc.stdin.flush()
- if method == "initialize":
- # wait for ccls to finish indexing
- time.sleep(2)
+ time.sleep(1)
got = read(proc.stdout)
if not tt[1] == got:
print("Expect:")
diff -Nru ccls-0.20190823.5/src/clang_tu.cc ccls-0.20190823.6/src/clang_tu.cc
--- ccls-0.20190823.5/src/clang_tu.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/clang_tu.cc 2020-04-22 15:02:27.000000000 +0800
@@ -8,6 +8,7 @@
#include <clang/AST/Type.h>
#include <clang/Lex/Lexer.h>
+#include <llvm/Support/Host.h>
#include <llvm/Support/Path.h>
using namespace clang;
diff -Nru ccls-0.20190823.5/src/filesystem.cc ccls-0.20190823.6/src/filesystem.cc
--- ccls-0.20190823.5/src/filesystem.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/filesystem.cc 2020-04-22 15:02:27.000000000 +0800
@@ -31,7 +31,8 @@
curr.pop_back();
for (sys::fs::directory_iterator i(folder1, ec, false), e; i != e && !ec;
i.increment(ec)) {
- std::string path = i->path(), filename = sys::path::filename(path);
+ std::string path = i->path();
+ std::string filename(sys::path::filename(path));
if ((filename[0] == '.' && filename != ".ccls") ||
sys::fs::status(path, status, false))
continue;
diff -Nru ccls-0.20190823.5/src/indexer.cc ccls-0.20190823.6/src/indexer.cc
--- ccls-0.20190823.5/src/indexer.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/indexer.cc 2020-04-22 15:02:27.000000000 +0800
@@ -10,6 +10,7 @@
#include "sema_manager.hh"
#include <clang/AST/AST.h>
+#include <clang/Basic/TargetInfo.h>
#include <clang/Frontend/FrontendAction.h>
#include <clang/Frontend/MultiplexConsumer.h>
#include <clang/Index/IndexDataConsumer.h>
@@ -508,7 +509,7 @@
llvm::raw_svector_ostream os(str);
d->print(os, getDefaultPolicy());
- std::string name = os.str();
+ std::string name(str.data(), str.size());
simplifyAnonymous(name);
// Remove \n in DeclPrinter.cpp "{\n" + if(!TerseOutput)something + "}"
for (std::string::size_type i = 0;;) {
@@ -677,10 +678,13 @@
public:
IndexDataConsumer(IndexParam ¶m) : param(param) {}
void initialize(ASTContext &ctx) override { this->ctx = param.ctx = &ctx; }
- bool handleDeclOccurence(const Decl *d, index::SymbolRoleSet roles,
- ArrayRef<index::SymbolRelation> relations,
- SourceLocation src_loc,
- ASTNodeInfo ast_node) override {
+#if LLVM_VERSION_MAJOR < 10 // llvmorg-10-init-12036-g3b9715cb219
+# define handleDeclOccurrence handleDeclOccurence
+#endif
+ bool handleDeclOccurrence(const Decl *d, index::SymbolRoleSet roles,
+ ArrayRef<index::SymbolRelation> relations,
+ SourceLocation src_loc,
+ ASTNodeInfo ast_node) override {
if (!param.no_linkage) {
if (auto *nd = dyn_cast<NamedDecl>(d); nd && nd->hasLinkage())
;
diff -Nru ccls-0.20190823.5/src/main.cc ccls-0.20190823.6/src/main.cc
--- ccls-0.20190823.5/src/main.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/main.cc 2020-04-22 15:02:27.000000000 +0800
@@ -140,7 +140,7 @@
if (opt_index.size()) {
SmallString<256> root(opt_index);
sys::fs::make_absolute(root);
- pipeline::standalone(root.str());
+ pipeline::standalone(std::string(root.data(), root.size()));
} else {
// The thread that reads from stdin and dispatchs commands to the main
// thread.
diff -Nru ccls-0.20190823.5/src/pipeline.cc ccls-0.20190823.6/src/pipeline.cc
--- ccls-0.20190823.5/src/pipeline.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/pipeline.cc 2020-04-22 15:02:27.000000000 +0800
@@ -113,7 +113,7 @@
}
// For inferred files, allow -o a a.cc -> -o b b.cc
- std::string stem = sys::path::stem(path);
+ StringRef stem = sys::path::stem(path);
int changed = -1, size = std::min(prev->args.size(), args.size());
for (int i = 0; i < size; i++)
if (strcmp(prev->args[i], args[i]) && sys::path::stem(args[i]) != stem) {
diff -Nru ccls-0.20190823.5/src/platform.hh ccls-0.20190823.6/src/platform.hh
--- ccls-0.20190823.5/src/platform.hh 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/platform.hh 2020-04-22 15:02:27.000000000 +0800
@@ -1,14 +1,14 @@
-// Copyright 2017-2018 ccls Authors
+// Copyright 2017-2020 ccls Authors
// SPDX-License-Identifier: Apache-2.0
#pragma once
+#include <llvm/ADT/StringRef.h>
+
#include <string>
-#include <string_view>
-#include <vector>
namespace ccls {
-std::string normalizePath(const std::string &path);
+std::string normalizePath(llvm::StringRef path);
// Free any unused memory and return it to the system.
void freeUnusedMemory();
diff -Nru ccls-0.20190823.5/src/platform_posix.cc ccls-0.20190823.6/src/platform_posix.cc
--- ccls-0.20190823.5/src/platform_posix.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/platform_posix.cc 2020-04-22 15:02:27.000000000 +0800
@@ -40,7 +40,7 @@
void threadEnter();
}
-std::string normalizePath(const std::string &path) {
+std::string normalizePath(llvm::StringRef path) {
llvm::SmallString<256> p(path);
llvm::sys::path::remove_dots(p, true);
return {p.data(), p.size()};
diff -Nru ccls-0.20190823.5/src/platform_win.cc ccls-0.20190823.6/src/platform_win.cc
--- ccls-0.20190823.5/src/platform_win.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/platform_win.cc 2020-04-22 15:02:27.000000000 +0800
@@ -19,17 +19,12 @@
#include <thread>
namespace ccls {
-std::string normalizePath(const std::string &path) {
- DWORD retval = 0;
+std::string normalizePath(llvm::StringRef path) {
TCHAR buffer[MAX_PATH] = TEXT("");
TCHAR **lpp_part = {NULL};
- std::string result;
- retval = GetFullPathName(path.c_str(), MAX_PATH, buffer, lpp_part);
- // fail, return original
- if (retval == 0)
- result = path;
- else
+ std::string result(path);
+ if (GetFullPathName(result.c_str(), MAX_PATH, buffer, lpp_part) != 0)
result = buffer;
std::replace(result.begin(), result.end(), '\\', '/');
diff -Nru ccls-0.20190823.5/src/project.cc ccls-0.20190823.6/src/project.cc
--- ccls-0.20190823.5/src/project.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/project.cc 2020-04-22 15:02:27.000000000 +0800
@@ -222,7 +222,7 @@
return {};
std::vector<const char *> args;
for (line_iterator i(*mbOrErr.get(), true, '#'), e; i != e; ++i) {
- std::string line = *i;
+ std::string line(*i);
doPathMapping(line);
args.push_back(intern(line));
}
@@ -632,7 +632,7 @@
void Project::indexRelated(const std::string &path) {
auto &gi = g_config->index;
GroupMatch match(gi.whitelist, gi.blacklist);
- std::string stem = sys::path::stem(path);
+ StringRef stem = sys::path::stem(path);
std::vector<const char *> args, extra_args;
for (const std::string &arg : g_config->clang.extraArgs)
extra_args.push_back(intern(arg));
diff -Nru ccls-0.20190823.5/src/sema_manager.cc ccls-0.20190823.6/src/sema_manager.cc
--- ccls-0.20190823.5/src/sema_manager.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/sema_manager.cc 2020-04-22 15:02:27.000000000 +0800
@@ -9,6 +9,7 @@
#include "pipeline.hh"
#include "platform.hh"
+#include <clang/Basic/TargetInfo.h>
#include <clang/Lex/PreprocessorOptions.h>
#include <clang/Sema/CodeCompleteConsumer.h>
#include <clang/Sema/Sema.h>
@@ -622,9 +623,10 @@
for (const Note &n : d.notes) {
SmallString<256> str(n.file);
llvm::sys::path::remove_dots(str, true);
- Location loc{DocumentUri::fromPath(str.str()),
- lsRange{{n.range.start.line, n.range.start.column},
- {n.range.end.line, n.range.end.column}}};
+ Location loc{
+ DocumentUri::fromPath(std::string(str.data(), str.size())),
+ lsRange{{n.range.start.line, n.range.start.column},
+ {n.range.end.line, n.range.end.column}}};
ls_diag.relatedInformation.push_back({loc, n.message});
}
} else {
diff -Nru ccls-0.20190823.5/src/serializer.cc ccls-0.20190823.6/src/serializer.cc
--- ccls-0.20190823.5/src/serializer.cc 2019-11-13 00:22:48.000000000 +0800
+++ ccls-0.20190823.6/src/serializer.cc 2020-04-22 15:02:27.000000000 +0800
@@ -1,4 +1,4 @@
-// Copyright 2017-2018 ccls Authors
+// Copyright 2017-2020 ccls Authors
// SPDX-License-Identifier: Apache-2.0
#include "serializer.hh"
@@ -13,6 +13,7 @@
#include <llvm/ADT/CachedHashString.h>
#include <llvm/ADT/DenseSet.h>
+#include <llvm/Support/Allocator.h>
#include <mutex>
#include <stdexcept>
@@ -216,7 +217,7 @@
reflectMemberStart(vis);
REFLECT_MEMBER(line);
if (gTestOutputMode) {
- std::string basename = llvm::sys::path::filename(v.resolved_path);
+ std::string basename(llvm::sys::path::filename(v.resolved_path));
if (v.resolved_path[0] != '&')
basename = "&" + basename;
REFLECT_MEMBER2("resolved_path", basename);
``` |
|