sammccall added inline comments.

================
Comment at: clang-tools-extra/clangd/ParsedAST.cpp:319
 
-    if (!CTChecks.empty()) {
-      ASTDiags.setLevelAdjuster([&CTContext](DiagnosticsEngine::Level 
DiagLevel,
-                                             const clang::Diagnostic &Info) {
+    ASTDiags.setLevelAdjuster([&, &Cfg(Config::current())](
+                                  DiagnosticsEngine::Level DiagLevel,
----------------
ArcsinX wrote:
> This line breaks GCC 5.4 build with the following log:
> ```
> llvm-project/clang-tools-extra/clangd/ParsedAST.cpp:319:55: error: binding 
> ‘const clang::clangd::Config’ to reference of type ‘clang::clangd::Config&’ 
> discards qualifiers
>      ASTDiags.setLevelAdjuster([&, &Cfg(Config::current())](
>                                                        ^
> ```
> Unsure is it a compiler bug or not. Moving `Cfg` out of the capture list or 
> using a cast to `Config &` solves the problem.
Thanks! Appears to be https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66735

Landed the workaround as 12de8e1399fecf691639ba430b3824acb1311e70


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95349/new/

https://reviews.llvm.org/D95349

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to