Skip to content
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

[SR-12802] [C++] Disambiguate functions with lvalue and rvalue reference parameters in the same overload set #55247

Open
swift-ci opened this issue May 13, 2020 · 1 comment
Labels
affects ABI Flag: Affects ABI c++ interop Feature: Interoperability with C++ c++ to swift Feature → c++ interop: c++ to swift clang importer Area → compiler: The clang importer compiler The Swift compiler in itself feature A feature request or implementation

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-12802
Radar rdar://problem/83465925
Original Reporter hlopko (JIRA User)
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels New Feature, AffectsABI, CxxInterop
Assignee None
Priority Medium

md5: f1606e30e6fff27879d88ad66f765fe0

Issue Description:

Right now we import lvalue and rvalue references identically, as `UnsafePointer` or `UnsafeMutablePointer` (and keeping the function name intact), which results in conflicts:

void example(int &);
void example(int &&);

Both get imported as:

func example(_: UnsafeMutablePointer<CInt>)

Ideally we shouldn't create or somehow resolve the ambiguity in imported Swift API in case T& and T&& are both in the same overload set.

@zoecarver
Copy link
Collaborator

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@zoecarver zoecarver added c++ interop Feature: Interoperability with C++ and removed CxxInterop labels Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added feature A feature request or implementation c++ to swift Feature → c++ interop: c++ to swift clang importer Area → compiler: The clang importer and removed new feature labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects ABI Flag: Affects ABI c++ interop Feature: Interoperability with C++ c++ to swift Feature → c++ interop: c++ to swift clang importer Area → compiler: The clang importer compiler The Swift compiler in itself feature A feature request or implementation
Projects
None yet
Development

No branches or pull requests

3 participants