Skip to content

Commit 788fc32

Browse files
committed
Update returnIfNotEqualGuard comment
Existing comment references the old way to do the comparison with a state variable. Updated comment covers how the function works and matches up the parameter names too.
1 parent 463a467 commit 788fc32

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/Sema/DerivedConformanceEquatableHashable.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,12 @@ static DeclRefExpr *convertEnumToIndex(SmallVectorImpl<ASTNode> &stmts,
260260
AccessSemantics::Ordinary, intType);
261261
}
262262

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.
266266
/// \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.
270269
static GuardStmt *returnIfNotEqualGuard(ASTContext &C,
271270
Expr *lhsExpr,
272271
Expr *rhsExpr) {

0 commit comments

Comments
 (0)