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

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed May 21 13:46:35 PDT 2025


================
@@ -6009,6 +6009,8 @@ def note_not_found_by_two_phase_lookup : Note<"%0 should be declared prior to th
 def err_undeclared_use : Error<"use of undeclared %0">;
 def warn_deprecated : Warning<"%0 is deprecated">,
     InGroup<DeprecatedDeclarations>;
+def warn_deprecated_switch_case : Warning<"%0 is deprecated">,
----------------
rnk wrote:

You can reuse diagnostic text with `warn_deprecated.Summary`. See other examples like:
```
def ext_vla_cxx_in_gnu_mode : Extension<ext_vla_cxx.Summary>,
```

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


More information about the cfe-commits mailing list