Skip to content

Commit 30482c3

Browse files
committed
[cxx-interop] Fix end -> nil fixit.
1 parent 048e5c7 commit 30482c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/CSDiagnostics.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4021,7 +4021,9 @@ void MissingMemberFailure::diagnoseUnsafeCxxMethod(SourceLoc loc,
40214021
ctx.Diags.diagnose(loc, diag::iterator_method_unavailable,
40224022
name.getBaseIdentifier().str());
40234023
ctx.Diags.diagnose(loc, diag::replace_with_nil)
4024-
.fixItReplaceChars(loc, callExpr->getArgs()->getEndLoc(), "nil");
4024+
.fixItReplaceChars(
4025+
getAnchor().getStartLoc(),
4026+
callExpr->getArgs()->getEndLoc().getAdvancedLoc(1), "nil");
40254027
} else {
40264028
ctx.Diags.diagnose(loc, diag::iterator_method_unavailable,
40274029
name.getBaseIdentifier().str());

0 commit comments

Comments
 (0)