[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 06:00:09 PDT 2018


kadircet added inline comments.


================
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:
> kadircet wrote:
> > 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.
> Doesn't this cause problems when the build flags are `-Wno-deprecated -Werror` then?
> We make this `-Wno-deprecated -Werror -Wdeprecated`, and now all uses of deprecated APIs are errors.
> 
> This seems like a common configuration, highly noticeable symptoms, and not what the user wants...
Well, adding -Wno-error=deprecated to get over this case. Now we might have problems if people wanted to see deprecation warnings as errors, but I believe this shouldn't be much of a problem since they will get those errors at built anytime and we won't be annoying other users(ones that show deprecation as warnings or not showing them at all, hopefully almost everyone?) too much.

WDYT?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51747





More information about the cfe-commits mailing list