@@ -260,20 +260,19 @@ static DeclRefExpr *convertEnumToIndex(SmallVectorImpl<ASTNode> &stmts,
260
260
AccessSemantics::Ordinary, intType);
261
261
}
262
262
263
- // / Generates a guard statement that checks whether the given lhs and rhs
264
- // / variables are equal; if they are not, then the isEqual variable is set to
265
- // / false and a break statement is executed .
263
+ // / Returns a generated guard statement that checks whether the given lhs and
264
+ // / rhs expressions are equal. If not equal, the else block for the guard
265
+ // / returns false .
266
266
// / \p C The AST context.
267
- // / \p lhsVar The first variable to test for equality.
268
- // / \p rhsVar The second variable to test for equality.
269
- // / \p isEqualVar The variable to set to false if the guard condition fails.
267
+ // / \p lhsExpr The first expression to compare for equality.
268
+ // / \p rhsExpr The second expression to compare for equality.
270
269
static GuardStmt *returnIfNotEqualGuard (ASTContext &C,
271
270
Expr *lhsExpr,
272
271
Expr *rhsExpr) {
273
272
SmallVector<StmtConditionElement, 1 > conditions;
274
- SmallVector<ASTNode, 2 > statements;
273
+ SmallVector<ASTNode, 1 > statements;
275
274
276
- // First, generate the statements for the body of the guard.
275
+ // First, generate the statement for the body of the guard.
277
276
// return false
278
277
auto falseExpr = new (C) BooleanLiteralExpr (false , SourceLoc (),
279
278
/* Implicit*/ true );
0 commit comments