Skip to content

Commit 0c6c5aa

Browse files
authored
[Parse] Remove unnecessary conversion to SourceRange (swiftlang#28926)
`SourceLoc`s are implicitly converted to `SourceRange`. Yay. NFC, Gardening
1 parent be4da20 commit 0c6c5aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Parse/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ Parser::parseList(tok RightK, SourceLoc LeftLoc, SourceLoc &RightLoc,
10541054
while (true) {
10551055
while (Tok.is(tok::comma)) {
10561056
diagnose(Tok, diag::unexpected_separator, ",")
1057-
.fixItRemove(SourceRange(Tok.getLoc()));
1057+
.fixItRemove(Tok.getLoc());
10581058
consumeToken();
10591059
}
10601060
SourceLoc StartLoc = Tok.getLoc();
@@ -1084,7 +1084,7 @@ Parser::parseList(tok RightK, SourceLoc LeftLoc, SourceLoc &RightLoc,
10841084
continue;
10851085
if (!AllowSepAfterLast) {
10861086
diagnose(Tok, diag::unexpected_separator, ",")
1087-
.fixItRemove(SourceRange(PreviousLoc));
1087+
.fixItRemove(PreviousLoc);
10881088
}
10891089
break;
10901090
}

0 commit comments

Comments
 (0)