Skip to content

Commit

Permalink
Fix precedence for c++20 three-way comparison operator
Browse files Browse the repository at this point in the history
  • Loading branch information
i-garrison authored and jonahgraham committed Jan 28, 2023
1 parent f131577 commit 97dccc2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,6 @@ private ICPPASTExpression expression(final ExprKind kind, final BinaryExprCtx ct
break;
case IToken.tEQUAL:
case IToken.tNOTEQUAL:
case IToken.tTHREEWAYCOMPARISON:
lastOperator = new BinaryOperator(lastOperator, expr, lt1, 80, 81);
break;
case IToken.tGT:
Expand All @@ -1122,6 +1121,9 @@ private ICPPASTExpression expression(final ExprKind kind, final BinaryExprCtx ct
case IGCCToken.tMIN:
lastOperator = new BinaryOperator(lastOperator, expr, lt1, 90, 91);
break;
case IToken.tTHREEWAYCOMPARISON:
lastOperator = new BinaryOperator(lastOperator, expr, lt1, 95, 96);
break;
case IToken.tGT_in_SHIFTR:
if (ctx == BinaryExprCtx.eInTemplateID) {
doneExpression = true;
Expand Down

0 comments on commit 97dccc2

Please sign in to comment.