[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 19 07:28:58 PDT 2025


================
@@ -11,8 +11,9 @@ let Component = "AST" in {
 // Constant expression diagnostics. These (and their users) belong in Sema.
 def note_expr_divide_by_zero : Note<"division by zero">;
 def note_constexpr_invalid_cast : Note<
-  "%select{reinterpret_cast|dynamic_cast|%select{this conversion|cast that"
-  " performs the conversions of a reinterpret_cast}1|cast from %1}0"
+  "%enum_select<ConstexprInvalidCastKind>{%Reinterpret{reinterpret_cast}|%Dynamic{dynamic_cast}|"
+  "%ThisCastOrReinterpret{%select{this conversion|cast that performs the conversions "
----------------
erichkeane wrote:

```suggestion
  "%ThisConversionOrReinterpret{%select{this conversion|cast that performs the conversions "
```

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


More information about the cfe-commits mailing list