mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Improve BinaryExpr
Abstract away the TupleExpr gunk and expose `getLHS` and `getRHS` accessors. This is in preparation for completely expunging the use of TupleExpr as an argument list.
This commit is contained in:
@@ -412,11 +412,11 @@ std::pair<bool, Expr*> NameMatcher::walkToExprPre(Expr *E) {
|
||||
case ExprKind::Binary: {
|
||||
BinaryExpr *BinE = cast<BinaryExpr>(E);
|
||||
// Visit in source order.
|
||||
if (!BinE->getArg()->getElement(0)->walk(*this))
|
||||
if (!BinE->getLHS()->walk(*this))
|
||||
return {false, nullptr};
|
||||
if (!BinE->getFn()->walk(*this))
|
||||
return {false, nullptr};
|
||||
if (!BinE->getArg()->getElement(1)->walk(*this))
|
||||
if (!BinE->getRHS()->walk(*this))
|
||||
return {false, nullptr};
|
||||
|
||||
// We already visited the children.
|
||||
|
||||
Reference in New Issue
Block a user