File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
test/Interop/Cxx/templates Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1653,7 +1653,7 @@ static ImportedType adjustTypeForConcreteImport(
1653
1653
// optional type.
1654
1654
bool isIUO = false ;
1655
1655
if (importKind != ImportTypeKind::Typedef && optKind != OTK_None &&
1656
- canImportAsOptional (hint) && !importedType-> isForeignReferenceType () ) {
1656
+ canImportAsOptional (hint)) {
1657
1657
isIUO = optKind == OTK_ImplicitlyUnwrappedOptional;
1658
1658
importedType = OptionalType::get (importedType);
1659
1659
}
@@ -2710,8 +2710,7 @@ ParameterList *ClangImporter::Implementation::importFunctionParameterList(
2710
2710
2711
2711
bool knownNonNull = !nonNullArgs.empty () && nonNullArgs[index];
2712
2712
// Specialized templates need to match the args/result exactly.
2713
- /* knownNonNull |= clangDecl->isFunctionTemplateSpecialization();*/
2714
- // FIXME: for CI test, DO NOT MERGE ME
2713
+ knownNonNull |= clangDecl->isFunctionTemplateSpecialization ();
2715
2714
2716
2715
// Check nullability of the parameter.
2717
2716
OptionalTypeKind optionalityOfParam =
Original file line number Diff line number Diff line change @@ -32,17 +32,17 @@ func takesPtrToStruct(x: UnsafePointer<PlainStruct>) { takesValue(x) }
32
32
func takesPtrToClass( x: UnsafePointer < CxxClass > ) { takesValue ( x) }
33
33
// CHECK: define {{.*}} void @{{.*}}takesPtrToClass{{.*}}
34
34
35
- func takesPtrToFRT ( x : UnsafePointer < FRT > ) { takesValue ( x ) }
36
- // CHECK: define {{.*}} void @{{.*}}takesPtrToFRT{{.*} }
35
+ // TODO: this does not work because this round-trips to UnsafePointer<FRT?>
36
+ // func takesPtrToFRT(x: UnsafePointer<FRT>) { takesValue(x) }
37
37
38
38
func takesMutPtrToStruct( x: UnsafeMutablePointer < PlainStruct > ) { takesValue ( x) }
39
39
// CHECK: define {{.*}} void @{{.*}}takesMutPtrToStruct{{.*}}
40
40
41
41
func takesMutPtrToClass( x: UnsafeMutablePointer < CxxClass > ) { takesValue ( x) }
42
42
// CHECK: define {{.*}} void @{{.*}}takesMutPtrToClass{{.*}}
43
43
44
- func takesMutPtrToFRT ( x : UnsafeMutablePointer < FRT > ) { takesValue ( x ) }
45
- // CHECK: define {{.*}} void @{{.*}}takesMutPtrToFRT{{.*} }
44
+ // TODO: this does not work because this round-trips to UnsafeMutablePointer<FRT?>
45
+ // func takesMutPtrToFRT(x: UnsafeMutablePointer<FRT>) { takesValue(x) }
46
46
47
47
// TODO: optional pointers are not yet supported but they should be
48
48
// func takesCPtr() { takesValue(intPtr) }
You can’t perform that action at this time.
0 commit comments