Skip to content

Commit 2e4d76c

Browse files
Merge pull request swiftlang#33257 from LucianoPAlmeida/fixme-remove-check
[NFC] Remove empty check for SingleExpression in Refactoring.cpp findConcatenatedExpressions
2 parents c7ecce4 + a31f51d commit 2e4d76c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/IDE/Refactoring.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,11 +1846,7 @@ findConcatenatedExpressions(ResolvedRangeInfo Info, ASTContext &Ctx) {
18461846

18471847
switch (Info.Kind) {
18481848
case RangeKind::SingleExpression:
1849-
// FIXME: the range info kind should imply non-empty list.
1850-
if (!Info.ContainedNodes.empty())
1851-
E = Info.ContainedNodes[0].get<Expr*>();
1852-
else
1853-
return nullptr;
1849+
E = Info.ContainedNodes[0].get<Expr*>();
18541850
break;
18551851
case RangeKind::PartOfExpression:
18561852
E = Info.CommonExprParent;

0 commit comments

Comments
 (0)