[libcxx-commits] [libcxx] [libc++] Diagnose unused variables of container types (PR #203084)
Aaron Ballman via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 24 06:14:41 PDT 2026
AaronBallman wrote:
> Hiding this behind a macro and having a way to opt out of the macro for at least one release has a very low cost, significantly simplifies the adoption in large code bases, and makes this patch uncontroversial. I think we should do it.
I think @philnik777 had a good point about thinking of the long-term design we want to end up with. Do we want libc++ to be configurable such that users can opt out of non-standards mandated functionality intended to help catch bugs? e.g., do we want users to have a way to opt out of nodiscard warnings, deprecation warnings, etc which are not mandated by the standard as a general feature of libc++? (We obviously want people to leave that kind of stuff enabled, but having an escape hatch for diagnostics is pretty typical for diagnostic behavior in the compiler so it stands to reason the library will have similar needs.)
https://github.com/llvm/llvm-project/pull/203084
More information about the libcxx-commits
mailing list