[PATCH] D48912: [libc++] Add deprecated attributes to many deprecated components

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 13:23:02 PDT 2018


aaron.ballman added a comment.

In https://reviews.llvm.org/D48912#1152573, @ldionne wrote:

> FWIW, I would prefer to enable deprecation warnings by default and to have a way of turning them off


I have a strong preference for this as well.

- These diagnostics are guaranteed to be true positive by definition, and some of them are even high-value beyond just "by the way, this may be removed" (like std::gets() or std::random_shuffle() for security purposes).
- Users are not likely to change their build systems to enable diagnostics they believe to already be enabled because they're enabled elsewhere. They may not even /know/ to change their build system because it's hard to notice silent behavior.
- WG21 has frequently talked about their reliance on tools to tell users about deprecations as early as possible so that they can prepare their code bases for the eventual removal. A default behavior of silencing the deprecation warnings runs contrary to that reliance and makes it harder for users to prepare their code base for those removals.

I think that silencing deprecation warnings by default does users a disservice.


Repository:
  rL LLVM

https://reviews.llvm.org/D48912





More information about the llvm-commits mailing list