Skip to content

Conversation

Xazax-hun
Copy link
Contributor

Fixes #83097

rdar://155973210

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@j-hui j-hui left a comment

Choose a reason for hiding this comment

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

This looks good, but I have one question: do you need account for const refs and volatile refs here, or is that information attached to the pointee type?

@Xazax-hun
Copy link
Contributor Author

const refs and volatile refs here, or is that information attached to the pointee type

Yup, those should be on the pointee type.

Copy link
Contributor

@egorzhdan egorzhdan left a comment

Choose a reason for hiding this comment

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

LGTM!

@Xazax-hun
Copy link
Contributor Author

@swift-ci please smoke test macOS

@mrousavy
Copy link

wow! crazy - nice work 👏

@Xazax-hun Xazax-hun merged commit f40d3b4 into swiftlang:main Jul 19, 2025
3 checks passed
Xazax-hun added a commit to Xazax-hun/swift that referenced this pull request Aug 13, 2025
Explanation: When generating type names for template instantiations for
name mangling we did not generate correct names for reference types
resulting in collisions in the mangled names.
Issues: rdar://157237301
Original PRs: swiftlang#83176
Risk: Low, the generated string is only used for name mangling.
Testing: Added a compiler test.
Reviewers: @egorzhdan
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++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When calling a Swift function that takes two std::functions with const-reference types as arguments, the Swift compiler crashes
4 participants