Skip to content

Commit ef43305

Browse files
committed
[Sema] NFC: Minor foldSequence simplification
1 parent 0a47c16 commit ef43305

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/Sema/TypeCheckExpr.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,8 @@ static Expr *foldSequence(DeclContext *DC,
418418
}
419419

420420
// Pull out the next binary operator.
421-
Op op2{S[0], TypeChecker::lookupPrecedenceGroupForInfixOperator(
422-
DC, S[0], /*diagnose=*/true)};
423-
424-
// If the second operator's precedence is lower than the
425-
// precedence bound, break out of the loop.
426-
if (!precedenceBound.shouldConsider(op2.precedence)) break;
421+
Op op2 = getNextOperator();
422+
if (!op2) break;
427423

428424
// If we're missing precedence info for either operator, treat them
429425
// as non-associative.

0 commit comments

Comments
 (0)