-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[docs] Start a doc on ClangImporter C->Swift name mapping #26947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Start a doc on ClangImporter C->Swift name mapping #26947
Conversation
@swift-ci Please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very welcome addition to our docs folder!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! Could you mention where the name translation APIs are declared in the compiler source? I presume it's SwiftNameTranslation.h
?
swift/AST/SwiftNameTranslation.h is for Swift-to-ObjC, not ObjC-to-Swift. Most of what's talked about here is in swift/ClangImporter/ImportName.h, but not all of it. |
@swift-ci Please smoke test |
ah, OK. Notice that both directions of translation are interesting for cross-language automatic renaming. |
I think I'll rename the file to CToSwiftNameTranslation, leaving room for a future SwiftToCNameTranslation. |
Sounds good, Thank you! |
Includes enums in all their flavors, plus swift_wrapper structs. Planned future content: - Methods, initializers, properties - "Omit-needless-words" rules - NSError - Boolean properties - Inferred default arguments - Factory methods as initializers - Protocols (mainly just that they check for collision) - CF types (low-priority since non-Apple people can't make them) - Custom names, including import-as-member and import-as-accessor - swift_private
6f0184e
to
aca84b9
Compare
@swift-ci Please smoke test |
We've got three approving reviewers so far, so if anyone else has comments we can take it in post-commit review. |
Includes enums in all their flavors, plus
swift_wrapper
structs.Planned future content: