-
Notifications
You must be signed in to change notification settings - Fork 10.5k
{AST,Basic}Bridging: Use <swift/bridging>
and try directly bridging one of our enums
#82165
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
@swift-ci please smoke test |
Let’s see if I’m being too ambitious. |
@swift-ci please smoke test |
@swift-ci please smoke test Linux |
@swift-ci please smoke test Windows |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test Windows |
…ing our own macros
@swift-ci please smoke test |
SWIFT_COMPUTED_PROPERTY | ||
const void *_Nullable getRaw() const { return Raw; } |
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.
Nice!
include/swift/Basic/BasicBridging.h
Outdated
const uint8_t *_Nullable getData() const { | ||
return (const uint8_t *)(Data ? Data : ""); |
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.
Huh, seems like this isn't actually nullable?
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.
Oh, the Data
itself is nonnull. Perhaps we don’t need this ternary at all.
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.
Hm, the constructor sets Data
to nullptr
. I thought _Nonnull
was supposed to prevent this.
@swift-ci please smoke test |
@swift-ci please test Windows |
<swift/bridging>
.swift::DiagnosticKind
instead of having an intermediateBridgedDiagnosticSeverity
enum.