File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2202,6 +2202,12 @@ ImportedType ClangImporter::Implementation::importMethodParamsAndReturnType(
2202
2202
SwiftContext.Diags .diagnose (methodLoc, diag::invalid_swift_name_method,
2203
2203
swiftParams.size () < argNames.size (),
2204
2204
swiftParams.size (), argNames.size ());
2205
+ ModuleDecl *parentModule = dc->getParentModule ();
2206
+ if (parentModule != ImportedHeaderUnit->getParentModule ()) {
2207
+ SwiftContext.Diags .diagnose (
2208
+ methodLoc, diag::unresolvable_clang_decl_is_a_framework_bug,
2209
+ parentModule->getName ().str ());
2210
+ }
2205
2211
}
2206
2212
return {Type (), false };
2207
2213
}
Original file line number Diff line number Diff line change @@ -19,11 +19,13 @@ func test(_ i: Int) {
19
19
20
20
// CHECK: warning: too few parameters in swift_name attribute (expected 2; got 1)
21
21
// CHECK: + (instancetype)g:(id)x outParam:(int *)foo SWIFT_NAME(init(g:));
22
-
22
+ // CHECK-NOT: warning:
23
+ // CHECK: note: please report this issue to the owners of 'ObjCIRExtras'
23
24
// CHECK-NOT: warning:
24
25
25
26
// CHECK: warning: too few parameters in swift_name attribute (expected 2; got 1)
26
27
// CHECK: + (instancetype)testW:(id)x out:(id *)outObject SWIFT_NAME(ww(_:));
28
+ // CHECK-NOT: warning:
29
+ // CHECK: note: please report this issue to the owners of 'ObjCIRExtras'
30
+ // CHECK-NOT: warning:
27
31
}
28
-
29
- // CHECK-NOT: warning:
You can’t perform that action at this time.
0 commit comments