Page MenuHomePhabricator

[clangd] Allow diagnostics to be suppressed with configuration

Authored by sammccall on Jan 25 2021, 5:06 AM.



This has been specifically requested:

and various issues can be addressed with this as a workaround, e.g.:

Diff Detail

Event Timeline

sammccall created this revision.Jan 25 2021, 5:06 AM
sammccall requested review of this revision.Jan 25 2021, 5:06 AM
hokein accepted this revision.Jan 25 2021, 6:34 AM
hokein added inline comments.

nit: use normalizeSuppressedCode(Code)?

This revision is now accepted and ready to land.Jan 25 2021, 6:34 AM
sammccall marked an inline comment as done.Jan 25 2021, 6:49 AM
This revision was landed with ongoing or failed builds.Jan 25 2021, 6:59 AM
This revision was automatically updated to reflect the committed changes.
ArcsinX added inline comments.

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.

sammccall added inline comments.Jan 27 2021, 6:33 AM