File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -5338,6 +5338,8 @@ bool MissingArgumentsFailure::diagnoseSingleMissingArgument() const {
5338
5338
// fn(argX, argY):
5339
5339
// fn(argX, argY[, argMissing])
5340
5340
if (args->empty ()) {
5341
+ if (!args->getRParenLoc ().isValid ())
5342
+ return false ;
5341
5343
insertLoc = args->getRParenLoc ();
5342
5344
} else if (position != 0 ) {
5343
5345
auto argPos = std::min (args->size (), position) - 1 ;
@@ -5377,9 +5379,6 @@ bool MissingArgumentsFailure::diagnoseSingleMissingArgument() const {
5377
5379
}
5378
5380
}
5379
5381
5380
- if (insertLoc.isInvalid ())
5381
- return false ;
5382
-
5383
5382
// If we are trying to insert a trailing closure but the parameter
5384
5383
// corresponding to the missing argument doesn't support a trailing closure,
5385
5384
// don't provide a Fix-It.
You can’t perform that action at this time.
0 commit comments