[clang] [clang][Sema] Combine fallout warnings to just one warning (PR #127546)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 18 10:41:48 PST 2025
Sirraide wrote:
> Will it have redefinition problem since I need to share this enum between two diagnostics?
Hmm, that’s a good point. I think in that case, for now just use `%enum_select` for one of the two and make the other one a regular `%select` (you can still use the enum for both then you emit the diagnostic); just make sure the `%select` cases are in the same order in both diagnostics.
CC @AaronBallman @erichkeane Would it make sense to have proper support for reusing enums across diagnostics w/ `%enum_select`? I can think of a few other diagnostics that have more or less an equivalent set of cases. Maybe we can just emit the enum once and check that every diagnostic that uses `%enum_select` w/ the same enum has the same number of cases / the same enumerators?
https://github.com/llvm/llvm-project/pull/127546
More information about the cfe-commits
mailing list