mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 06:26:43 +00:00
Doing an in-file X-macro, though maybe we'll want to move it out to a #include if we keep piling on more. I know there's `destroy` to add, and possibly `copy` and `move`, but I don't know what threshold we'll want for a separate file. Note this does set up for an advantage where we can `switch` instead of repeated `if` for special names, shifting to compile errors for new values. I also considered a simpler enum approach (with an implicit conversion to `NameId`) but that runs into issues with things like `Id::Kind::For<...>` as a consequence of calls like `name_id == special_name_id` (just requires another `operator==`) and `context.node_stack().Push(node_id, SemIR::NameId::SelfType);` (a little more complex how we'd want to handle it).