Skip to content

Commit c8dc836

Browse files
caldaxwu
andauthored
Apply suggestions from code review
Co-authored-by: Xiaodi Wu <[email protected]>
1 parent df1732b commit c8dc836

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/Sema/MiscDiagnostics.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,11 +1538,11 @@ static bool closureHasWeakSelfCapture(const AbstractClosureExpr *ACE) {
15381538
return false;
15391539
}
15401540

1541-
/// Whether or not impliciy self decls in this closure require manual
1541+
/// Whether or not implicit self decls in this closure require manual
15421542
/// lookup in order to perform diagnostics with the semantics described
15431543
/// in SE-0365. This is necessary for closures that capture self weakly
15441544
/// in Swift 5 language modes, since implicit self decls in weak self
1545-
//// closures has different semantics in Swift 5 than in Swift 6.
1545+
/// closures have different semantics in Swift 5 than in Swift 6.
15461546
static bool
15471547
closureRequiresManualLookupForImplicitSelf(const AbstractClosureExpr *ACE) {
15481548
if (ACE->getASTContext().LangOpts.isSwiftVersionAtLeast(6)) {
@@ -1689,7 +1689,7 @@ static void diagnoseImplicitSelfUseInClosure(const Expr *E,
16891689
// doVoidStuff { [weak self] in
16901690
// guard let self else { return }
16911691
// method()
1692-
// }
1692+
// }
16931693
//
16941694
// In Swift 6, the implicit self DRE refers to the self decl
16951695
// defined in the guard statement. In Swift 5 mode, the implicit
@@ -2746,7 +2746,7 @@ class VarDeclUsageChecker : public ASTWalker {
27462746
// doVoidStuff { [weak self] in
27472747
// guard let self else { return }
27482748
// method()
2749-
// }
2749+
// }
27502750
//
27512751
// In Swift 6, the implicit self DRE refers to the self decl
27522752
// defined in the guard statement. In Swift 5 mode, the implicit

0 commit comments

Comments
 (0)