Files
Paul PasseronandPaul Passeron de8e8e24c9 Derive Comparable via macro (#91972)
Move `Comparable` derivation to a macro under a feature flag

Adds a `DeriveConformancesViaMacros` feature flag path for deriving
`<(_:_:)`
on eligible enums. When enabled, `DerivedConformance::deriveComparable`
builds a `#_deriveComparable(...)` macro call instead of hand-crafting
the AST nodes, and the new `DeriveComparableMacro` (in`SwiftMacros`)
expands it.

Type info is encoded in a similar way as for `Equatable`, reusing the
enum information logic.

The non-macro path is untouched. This is opt-in via the feature flag.

---------

Co-authored-by: Paul Passeron <paul_passeron@apple.com>
2026-10-01 14:45:02 +01:00
..