[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 13 04:53:24 PDT 2018
kadircet added a comment.
As discussed offline with Ilya, decided to keep the compile flag addition since it would be easier to pass the logic of a command line flag to that point. Also not changing the severity level, since they will show up on diagnostics lists in anyway it doesn't save much.
================
Comment at: clangd/ClangdServer.cpp:537
C->CommandLine.push_back("-resource-dir=" + ResourceDir);
+ C->CommandLine.push_back("-Wdeprecated-declarations");
return std::move(*C);
----------------
sammccall wrote:
> as noted above I think we should also have -Wno-error=deprecated-declarations
>
> (do you want all of -Wdeprecated, actually?)
Yes for the second part and no for the first part. As we saw there are some configs out there that treat some types of deprecation warnings as errors, so we don't want to change that behavior.
================
Comment at: clangd/Diagnostics.cpp:299
+ D.Severity =
+ D.Category == "Deprecations" ? DiagnosticsEngine::Note : DiagLevel;
return D;
----------------
sammccall wrote:
> not sure what the concrete benefits are from using Note rather than Warning. It's semantically iffy, so if we do this it should have a comment justifying it.
Agree on that one, decided on not implementing such a thing until it becomes necessary.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51747
More information about the cfe-commits
mailing list