[PATCH] D95349: [clangd] Allow diagnostics to be suppressed with configuration
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 27 06:33:28 PST 2021
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
More information about the cfe-commits
mailing list