[clang] [Sema] Warn about omitting deprecated enumerator in switch (PR #138562)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 14 01:50:54 PDT 2025


cor3ntin wrote:

> Maybe we should suppress that warning for switch cases? Or suggest adding a default label instead?

I think silencing the warning is better than suggesting a default case, which may not be considered good practice.
Maybe we can add a -Wdeprecated-switch-case warning that people can control independently of  -Wdeprecated-declarations

https://github.com/llvm/llvm-project/pull/138562


More information about the cfe-commits mailing list