Files
swift-mirror/test/APINotes/Inputs/custom-modules/APINotesTest.apinotes
Tony Allevato 0924981eab Handle raw identifiers correctly in renamed APIs.
This change adds support for raw identifiers when renaming APIs in
Swift. This includes APIs defined in Swift (using the
`@availability(..., renamed: ...)` attribute), as well as C/Objective-C
(using either the `swift_name` attribute or APINotes). All of these take
decl names as strings, and so the parsing for these requires that any
decl name components (the base name or the argument labels) must have
surrounding backticks in order to be treated correctly as a raw
identifier.

Getting this working required some refactoring of `ParsedDeclName`
since it previously assumed that it could just split around delimiters
like `.`, `(`, and `:`. That's no longer guaranteed to work, so I've
introduced backtick-aware split helpers to deal with this. Likewise,
`ParsedDeclName` now keeps track of special decl base names (like
`init` and `subscript`) to ensure that they're handled properly and
not incorrectly escaped under the new logic.
2026-05-17 21:03:18 -04:00

28 lines
597 B
Plaintext

Name: APINotesTest
Functions:
- Name: moveToPoint
SwiftName: 'moveTo(x:y:z:)'
- Name: jumpToPoint
SwiftName: '`jump to`(x:)'
Globals:
- Name: ANTGlobalValue
SwiftName: global
- Name: ANTGlobalValue2
SwiftName: '`test raw`'
- Name: ANTGlobalValue3
SwiftName: '`Complex.Name`'
- Name: ANTGlobalValue4
SwiftName: '`class`'
- Name: ANTGlobalValue5
SwiftName: '`3test raw`'
- Name: will_be_private
SwiftPrivate: true
Tags:
- Name: PointStruct
SwiftName: Point
Typedefs:
- Name: real_t
SwiftName: Real
- Name: RectStruct
SwiftName: Rect