[llvm-branch-commits] [clang-tools-extra] d64226e - [clangd] Work around GCC bug 66735

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 27 15:32:36 PST 2021


Author: Sam McCall
Date: 2021-01-27T15:23:35-08:00
New Revision: d64226e8fab8fc7b4d947223c61036a60eb6a871

URL: https://github.com/llvm/llvm-project/commit/d64226e8fab8fc7b4d947223c61036a60eb6a871
DIFF: https://github.com/llvm/llvm-project/commit/d64226e8fab8fc7b4d947223c61036a60eb6a871.diff

LOG: [clangd] Work around GCC bug 66735

(cherry picked from commit 12de8e1399fecf691639ba430b3824acb1311e70)

Added: 
    

Modified: 
    clang-tools-extra/clangd/ParsedAST.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ParsedAST.cpp b/clang-tools-extra/clangd/ParsedAST.cpp
index 403d3fe3e64f..1020282f5ee8 100644
--- a/clang-tools-extra/clangd/ParsedAST.cpp
+++ b/clang-tools-extra/clangd/ParsedAST.cpp
@@ -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))


        


More information about the llvm-branch-commits mailing list