Skip to content

{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

Merged
merged 3 commits into from
Jun 17, 2025

Conversation

AnthonyLatsis
Copy link
Collaborator

  • Use <swift/bridging>.
  • Directly bridge swift::DiagnosticKind instead of having an intermediate BridgedDiagnosticSeverity enum.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

Let’s see if I’m being too ambitious.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Linux

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Windows

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test Windows

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

Comment on lines +123 to +125
SWIFT_COMPUTED_PROPERTY
const void *_Nullable getRaw() const { return Raw; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Comment on lines 250 to 251
const uint8_t *_Nullable getData() const {
return (const uint8_t *)(Data ? Data : "");
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@AnthonyLatsis AnthonyLatsis enabled auto-merge June 16, 2025 22:10
@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please test Windows

@AnthonyLatsis AnthonyLatsis merged commit faa7f67 into swiftlang:main Jun 17, 2025
3 checks passed
@AnthonyLatsis AnthonyLatsis deleted the jepa branch June 17, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants