-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Import member operator functions as static members #32293
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
Conversation
Those are marked as `inout` and should not be bridged.
to enum values
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 now in a state where I'd be mostly happy with it. Some tests need fixing for non-Linux platforms, but I think it is ready for review.
to better fit the overall naming scheme
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
We can't yet call member functions correctly on Windows.
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.
I've addressed the remaining issues. I think this is now ready for merging.
@gribozavr can you take another look before I merge?
@swift-ci please test |
Build failed |
This adds support to
ClangImporter
to import C++ member function operators as static methods into Swift.The left-hand-side operand, which gets passed as the
this
pointer to the C++ function is represented as an additional first parameter in the Swift method. It gets mapped back in SILGen.