[clangd] Work around GCC bug 66735

This commit is contained in:
Sam McCall 2021-01-27 15:32:05 +01:00
parent c0fc38ce15
commit 12de8e1399
1 changed files with 2 additions and 2 deletions

View File

@ -316,8 +316,8 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
Check->registerMatchers(&CTFinder);
}
ASTDiags.setLevelAdjuster([&, &Cfg(Config::current())](
DiagnosticsEngine::Level DiagLevel,
const Config& Cfg = Config::current();
ASTDiags.setLevelAdjuster([&](DiagnosticsEngine::Level DiagLevel,
const clang::Diagnostic &Info) {
if (Cfg.Diagnostics.SuppressAll ||
isBuiltinDiagnosticSuppressed(Info.getID(), Cfg.Diagnostics.Suppress))