@@ -4047,11 +4047,7 @@ void MissingMemberFailure::diagnoseUnsafeCxxMethod(SourceLoc loc,
4047
4047
auto dotExpr = getAsExpr<UnresolvedDotExpr>(anchor);
4048
4048
auto callExpr = getAsExpr<CallExpr>(findParentExpr (dotExpr));
4049
4049
4050
- ctx.Diags .diagnose (loc, diag::projection_reference_not_imported,
4051
- name.getBaseIdentifier ().str (), returnTypeStr);
4052
- ctx.Diags .diagnose (loc, diag::projection_may_return_interior_ptr,
4053
- name.getBaseIdentifier ().str ());
4054
- ctx.Diags .diagnose (loc, diag::at_to_subscript)
4050
+ ctx.Diags .diagnose (dotExpr->getDotLoc (), diag::at_to_subscript)
4055
4051
.fixItRemove (
4056
4052
{dotExpr->getDotLoc (), callExpr->getArgs ()->getStartLoc ()})
4057
4053
.fixItReplaceChars (
@@ -4060,6 +4056,10 @@ void MissingMemberFailure::diagnoseUnsafeCxxMethod(SourceLoc loc,
4060
4056
.fixItReplaceChars (
4061
4057
callExpr->getArgs ()->getEndLoc (),
4062
4058
callExpr->getArgs ()->getEndLoc ().getAdvancedLoc (1 ), " ]" );
4059
+ ctx.Diags .diagnose (loc, diag::projection_reference_not_imported,
4060
+ name.getBaseIdentifier ().str (), returnTypeStr);
4061
+ ctx.Diags .diagnose (loc, diag::projection_may_return_interior_ptr,
4062
+ name.getBaseIdentifier ().str ());
4063
4063
} else {
4064
4064
ctx.Diags .diagnose (loc, diag::projection_reference_not_imported,
4065
4065
name.getBaseIdentifier ().str (), returnTypeStr);
0 commit comments