[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 13 06:04:47 PDT 2025
================
@@ -131,17 +131,21 @@ def note_constexpr_past_end : Note<
"dereferenced pointer past the end of %select{|subobject of }0"
"%select{temporary|%2}1 is not a constant expression">;
def note_constexpr_past_end_subobject : Note<
- "cannot %select{access base class of|access derived class of|access field of|"
- "access array element of|ERROR|"
- "access real component of|access imaginary component of}0 "
- "pointer past the end of object">;
+ "cannot %enum_select<AccessType>{"
+ "%BaseClassAccess{access base class of}|%DerivedClassAccess{access derived class of}|"
----------------
Sirraide wrote:
I think these can just be e.g. `BaseClass` rather than `BaseClassAccess`, otherwise we’ll end up with `AccessKind::BaseClassAccess`, which feels a bit redundant.
https://github.com/llvm/llvm-project/pull/130868
More information about the cfe-commits
mailing list