Skip to content

Conversation

@hnrklssn
Copy link
Member

@hnrklssn hnrklssn commented Oct 15, 2025

Inheriting a clang import marked requires: !swift will always result
in an error. This skips such imports, which may result in name lookup
errors instead, but also may not, depending on the module.

Similarly, imports of modules marked requires: cplusplus should only be inherited
when C++ interop is enabled, and imports of modules marked
requires: !cplusplus should only be inherited when C++ interop is
disabled.

rdar://161795145

Based on top of #84870
Extracted from #84642

@hnrklssn
Copy link
Member Author

@swift-ci please smoke test

@hnrklssn hnrklssn mentioned this pull request Oct 15, 2025
Inheriting a clang import marked `requires: !swift` will always result
in an error. This skips such imports, which *may* result in name lookup
errors instead, but also may not, depending on the module.

rdar://161795145
Imports of modules marked `requires: cplusplus` should only be inherited
when C++ interop is enabled. Similarly, imports of modules marked
`requires: !cplusplus` should only be inherited when C++ interop is
disabled.
@hnrklssn hnrklssn force-pushed the inherit-skip-unfulfilled-require branch from f4ba962 to 8542903 Compare October 15, 2025 21:25
@hnrklssn
Copy link
Member Author

Fixed test case on Windows. Rebased on top of main after merging #84870

@hnrklssn
Copy link
Member Author

@swift-ci please smoke test

@hnrklssn hnrklssn enabled auto-merge October 15, 2025 21:26
@hnrklssn hnrklssn merged commit c66de29 into swiftlang:main Oct 16, 2025
3 checks passed
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