Skip to content

[5.9][interop][SwiftToCxx] remove extraneous semicolon when emitting 'prag… #65752

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

hyp
Copy link
Contributor

@hyp hyp commented May 8, 2023

…ma clang module import'

The semicolon actually causes a compiler error in that case

(cherry picked from commit 228078f)

Explanation: The emitted #pragma clang module import directive had a semicolon at the end of it which caused an error when this code was actually reached by the preprocessor. Remove the semicolon.
Scope: Swift's and C++ interoperability, generated header printer.
Risk: Low. This only affects the use of #pragma clang module import that imports dependencies in C++ mode.
Testing: Swift unit tests, manual testing on some adopter projects and several Swift packages that import C.
PR: #65662
Reviewer: @egorzhdan

…ma clang module import'

The semicolon actually causes a compiler error in that case

(cherry picked from commit 228078f)
@hyp hyp added c++ interop Feature: Interoperability with C++ swift 5.9 labels May 8, 2023
@hyp hyp requested a review from a team as a code owner May 8, 2023 05:42
@hyp
Copy link
Contributor Author

hyp commented May 8, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented May 8, 2023

@swift-ci please test source compatibility

@hyp
Copy link
Contributor Author

hyp commented May 8, 2023

@swift-ci please test macOS platform

@hyp hyp merged commit dc77f8c into swiftlang:release/5.9 May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants