Files
swift-mirror/test/Interop/Cxx/foreign-reference/Inputs/module.modulemap
John Hui ec506f824b [cxx-interop] Fix swift::Type to clang::QualType conversion to correctly handle foreign reference types
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
2024-10-07 14:40:38 -07:00

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
}