Commit Graph

7 Commits

Author SHA1 Message Date
Kuba (Brecka) Mracek
75506a17ce Merge pull request #85413 from kubamracek/section-convention-c
Allow function conversions to `@convention(c)` in `@section` expressions
2025-11-11 04:18:30 -08:00
Kuba Mracek
4e919fb235 Allow function conversions to @convention(c) in @section expressions 2025-11-10 09:34:38 -08:00
Kuba Mracek
ac49d93e3f Support 'as UInt8' in @section expressions 2025-11-10 09:02:40 -08:00
Kuba Mracek
ca737d3d97 Tweak diagnostic text on @section/@const errors 2025-10-23 17:05:41 -07:00
Kuba Mracek
f41ce336cf Drop unused MemberRefExpr handling in LegalConstExprVerifier, adjust tests 2025-10-23 17:02:15 -07:00
Kuba Mracek
19f3320f20 Better handling of metatypes and operators in LegalConstExprVerifier.cpp 2025-10-23 09:27:01 -07:00
Kuba Mracek
adeb40f261 SE-0492: Stabilize @_section/@_used into @section/@used
Removes the underscored prefixes from the @_section and @_used attributes, making them public as @section and @used respectively. The SymbolLinkageMarkers experimental feature has been removed as these attributes are now part of the standard language. Implemented expression syntactic checking rules per SE-0492.

Major parts:
- Renamed @_section to @section and @_used to @used
- Removed the SymbolLinkageMarkers experimental feature
- Added parsing support for the old underscored names with deprecation warnings
- Updated all tests and examples to use the new attribute names
- Added syntactic validation for @section to align with SE-0492 (reusing the legality checker by @artemcm)
- Changed @DebugDescription macro to explicitly use a tuple type instead of type inferring it, to comply with the expression syntax rules
- Added a testcase for the various allowed and disallowed syntactic forms, `test/ConstValues/SectionSyntactic.swift`.
2025-10-22 16:05:39 -07:00