Skip to content

Commit e4b7e31

Browse files
committed
[SyntaxModel] Remove some dead code
This code doesn't quite do what it says it does, and appears to be dead as we should never form an argument list TupleExpr with an OptionalEvaluationExpr parent. Given the test case that was added with it still passes, let's remove it.
1 parent b3356b0 commit e4b7e31

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/IDE/SyntaxModel.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,6 @@ std::pair<bool, Expr *> ModelASTWalker::walkToExprPre(Expr *E) {
571571
if (auto *ParentTupleExpr = dyn_cast_or_null<TupleExpr>(Parent.getAsExpr())) {
572572
// the argument value is a tuple expression already, we can just extract it
573573
addCallArgExpr(E, ParentTupleExpr);
574-
} else if (auto *ParentOptionalExpr = dyn_cast_or_null<OptionalEvaluationExpr>(Parent.getAsExpr())) {
575-
// if an argument value is an optional expression, we should extract the
576-
// argument from the subexpression
577-
if (auto *ParentTupleExpr = dyn_cast_or_null<TupleExpr>(ParentOptionalExpr->getSubExpr())) {
578-
addCallArgExpr(E, ParentTupleExpr);
579-
}
580574
}
581575

582576
if (E->isImplicit())

0 commit comments

Comments
 (0)