mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
For types imported from C++, the original clang::TypeDecl is saved in the swift::Type and reused for conversions back to clang::QualType. However, the conversion did not account for foreign reference types, which should be mapped to a pointer to the C++ record type, rather than the record type itself. This bug first appeared as a function template instantiation failure due to a sanity check performed by SwiftDeclConverter::foreignReferenceTypePassedByRef() but may also affect other round-tripping type conversions. The added test case demonstrates the template instantiation scenario, where templates were being used to overcome Swift/C++ interop's current lack of support for class inheritance. rdar://134979343
61 lines
983 B
Plaintext
61 lines
983 B
Plaintext
module POD {
|
|
header "pod.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module MoveOnly {
|
|
header "move-only.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module Singleton {
|
|
header "singleton.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module Nullable {
|
|
header "nullable.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module Inheritance {
|
|
header "inheritance.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module WitnessTable {
|
|
header "witness-table.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module ReferenceCounted {
|
|
header "reference-counted.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module ReferenceCountedObjCProperty {
|
|
header "reference-counted-objc-property.h"
|
|
requires cplusplus
|
|
export *
|
|
}
|
|
|
|
module MemberLayout {
|
|
header "member-layout.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module MemberInheritance {
|
|
header "member-inheritance.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module DerivedFieldGetterReturnsOwnedFRT {
|
|
header "derived-field-getter-returns-owned-frt.h"
|
|
requires cplusplus
|
|
}
|
|
|
|
module FunctionsAndMethodsReturningFRT {
|
|
header "cxx-functions-and-methods-returning-frt.h"
|
|
requires cplusplus
|
|
}
|