mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 14:36:46 +00:00
Fix -Wdangling-assignment-gsl in ClangdLSPServerTests
I think this is a false positive for a non-capturing lambda, but I can't find anything in the standard that guarantees that these have eternal lifetime.
This commit is contained in:
parent
fe162bed53
commit
a3b4d91474
@ -208,12 +208,13 @@ TEST_F(LSPTest, ClangTidyRename) {
|
||||
Annotations Source(R"cpp(
|
||||
void [[foo]]() {}
|
||||
)cpp");
|
||||
Opts.ClangTidyProvider = [](tidy::ClangTidyOptions &ClangTidyOpts,
|
||||
llvm::StringRef) {
|
||||
constexpr auto ClangTidyProvider = [](tidy::ClangTidyOptions &ClangTidyOpts,
|
||||
llvm::StringRef) {
|
||||
ClangTidyOpts.Checks = {"-*,readability-identifier-naming"};
|
||||
ClangTidyOpts.CheckOptions["readability-identifier-naming.FunctionCase"] =
|
||||
"CamelCase";
|
||||
};
|
||||
Opts.ClangTidyProvider = ClangTidyProvider;
|
||||
auto &Client = start();
|
||||
Client.didOpen("foo.hpp", Header.code());
|
||||
Client.didOpen("foo.cpp", Source.code());
|
||||
@ -266,10 +267,11 @@ TEST_F(LSPTest, ClangTidyCrash_Issue109367) {
|
||||
// This test requires clang-tidy checks to be linked in.
|
||||
if (!CLANGD_TIDY_CHECKS)
|
||||
return;
|
||||
Opts.ClangTidyProvider = [](tidy::ClangTidyOptions &ClangTidyOpts,
|
||||
llvm::StringRef) {
|
||||
constexpr auto ClangTidyProvider = [](tidy::ClangTidyOptions &ClangTidyOpts,
|
||||
llvm::StringRef) {
|
||||
ClangTidyOpts.Checks = {"-*,boost-use-ranges"};
|
||||
};
|
||||
Opts.ClangTidyProvider = ClangTidyProvider;
|
||||
// Check that registering the boost-use-ranges checker's matchers
|
||||
// on two different threads does not cause a crash.
|
||||
auto &Client = start();
|
||||
|
Loading…
x
Reference in New Issue
Block a user