3 Commits

Author SHA1 Message Date
Hans Wennborg
f20423f496
[clang] Rename -Wdeprecated-switch-case to -Wdeprecated-declarations-switch-case (#141779)
To make it more clear that it's a subset of -Wdeprecated-declarations.

Follow-up to #138562
2025-05-28 23:03:10 +02:00
Hans Wennborg
f4e14bf213
[Sema] Warn about omitting deprecated enumerator in switch (#138562)
This undoes part of 3e4e3b17c14c15c23c0ed18ca9165b42b1b13ae3 which added
the "Omitting a deprecated constant is ok; it should never materialize."
logic.

That seems wrong: deprecated means the enumerator is likely to be
removed in future versions, not that it cannot materialize.

Also move warnings about the use of deprecated enumerators in switch cases
behind a separate flag, -Wdeprecated-switch-case, for users who wish to
handle such enums explicitly and suppress the warning.
2025-05-23 09:40:49 +02:00
Erik Pilkington
3e4e3b17c1 [Sema] Don't warn about omitting unavailable enum constants in a switch
rdar://42717026

Differential revision: https://reviews.llvm.org/D51649

llvm-svn: 341490
2018-09-05 19:13:27 +00:00