Skip to content

[cxx-interop] calls to __swift_interopStaticCast in synthesized base class member accessors should not copy C++ type by value #65876

@hyp

Description

@hyp

Right now, when Swift compiler synthesizes a call to __swift_interopStaticCast when creating a thunk for imported C++ type that calls a const base class method (non-mutating), it ends up passing the C++ record by value, thus copying the given value. This should be avoided, we should pass them by const ref or pointer, like we do when invoking mutating methods.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.c++ interopFeature: Interoperability with C++swift 5.10triage neededThis issue needs more specific labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions