mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:40:12 +01:00
This uses the `CARBON_KIND_ANY(AnyImportRef, auto import_ref):` syntax that seemed to be favored [on Discord](https://discord.com/channels/655572317891461132/655578254970716160/1478486848207720478). This converted uses in the `sem_ir` directory to show it works initially, then added `check` for full coverage plus validating the `SemIR::` namespace discard. Note in inst_namer.cpp, AnyBindingPattern includes FormBindingPattern which wasn't previously handled. I'm disabling clang-format because I think it formats with readability issues, e.g.: ``` #define CARBON_KIND_ANY_EXPAND_AnyBinding(X, SEP) \ X(::Carbon::SemIR::AliasBinding) \ SEP X(::Carbon::SemIR::FormBinding) SEP X(::Carbon::SemIR::RefBinding) \ SEP X(::Carbon::SemIR::SymbolicBinding) \ SEP X(::Carbon::SemIR::ValueBinding) ``` Since `SEP` is typically a comma, it's also a nuisance to treat as an argument to `X` (which could get better results). Assisted-by: Google Antigravity with Gemini 3 Flash