Skip to content

Commit d64226e

Browse files
sam-mccalltstellar
authored andcommitted
[clangd] Work around GCC bug 66735
(cherry picked from commit 12de8e1)
1 parent f2a45d3 commit d64226e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clangd/ParsedAST.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
316316
Check->registerMatchers(&CTFinder);
317317
}
318318

319-
ASTDiags.setLevelAdjuster([&, &Cfg(Config::current())](
320-
DiagnosticsEngine::Level DiagLevel,
319+
const Config& Cfg = Config::current();
320+
ASTDiags.setLevelAdjuster([&](DiagnosticsEngine::Level DiagLevel,
321321
const clang::Diagnostic &Info) {
322322
if (Cfg.Diagnostics.SuppressAll ||
323323
isBuiltinDiagnosticSuppressed(Info.getID(), Cfg.Diagnostics.Suppress))

0 commit comments

Comments
 (0)