@@ -1046,7 +1046,7 @@ bool Parser::parseDifferentiableAttributeArguments(
1046
1046
linear = true ;
1047
1047
consumeToken (tok::identifier);
1048
1048
// If no trailing comma or 'where' clause, terminate parsing arguments.
1049
- if (Tok.isNot (tok::comma) && Tok. isNot ( tok::kw_where))
1049
+ if (Tok.isNot (tok::comma, tok::kw_where))
1050
1050
return false ;
1051
1051
if (consumeIfTrailingComma ())
1052
1052
return errorAndSkipToEnd ();
@@ -1089,7 +1089,7 @@ bool Parser::parseDifferentiableAttributeArguments(
1089
1089
funcDiag, /* allowOperators=*/ true ,
1090
1090
/* allowZeroArgCompoundNames=*/ true );
1091
1091
// If no trailing comma or 'where' clause, terminate parsing arguments.
1092
- if (Tok.isNot (tok::comma) && Tok. isNot ( tok::kw_where))
1092
+ if (Tok.isNot (tok::comma, tok::kw_where))
1093
1093
terminateParsingArgs = true ;
1094
1094
return !result.Name ;
1095
1095
};
@@ -1126,8 +1126,7 @@ bool Parser::parseDifferentiableAttributeArguments(
1126
1126
}
1127
1127
1128
1128
// If parser has not advanced and token is not 'where' or ')', emit error.
1129
- if (Tok.getLoc () == startingLoc &&
1130
- Tok.isNot (tok::kw_where) && Tok.isNot (tok::r_paren)) {
1129
+ if (Tok.getLoc () == startingLoc && Tok.isNot (tok::kw_where, tok::r_paren)) {
1131
1130
diagnose (Tok, diag::attr_differentiable_expected_label);
1132
1131
return errorAndSkipToEnd ();
1133
1132
}
0 commit comments