@@ -363,7 +363,7 @@ class AttributeChecker : public AttributeVisitor<AttributeChecker> {
363363
364364 void visitUnsafeInheritExecutorAttr (UnsafeInheritExecutorAttr *attr);
365365
366- bool visitLifetimeAttr (DeclAttribute *attr);
366+ bool visitOwnershipAttr (DeclAttribute *attr);
367367 void visitEagerMoveAttr (EagerMoveAttr *attr);
368368 void visitNoEagerMoveAttr (NoEagerMoveAttr *attr);
369369
@@ -403,7 +403,7 @@ void AttributeChecker::visitNoImplicitCopyAttr(NoImplicitCopyAttr *attr) {
403403 }
404404
405405 if (auto *funcDecl = dyn_cast<FuncDecl>(D)) {
406- if (visitLifetimeAttr (attr))
406+ if (visitOwnershipAttr (attr))
407407 return ;
408408
409409 // We only handle non-lvalue arguments today.
@@ -7480,7 +7480,7 @@ void AttributeChecker::visitUnsafeInheritExecutorAttr(
74807480 }
74817481}
74827482
7483- bool AttributeChecker::visitLifetimeAttr (DeclAttribute *attr) {
7483+ bool AttributeChecker::visitOwnershipAttr (DeclAttribute *attr) {
74847484 if (auto *funcDecl = dyn_cast<FuncDecl>(D)) {
74857485 auto declContext = funcDecl->getDeclContext ();
74867486 // eagerMove attribute may only appear in type context
@@ -7493,7 +7493,7 @@ bool AttributeChecker::visitLifetimeAttr(DeclAttribute *attr) {
74937493}
74947494
74957495void AttributeChecker::visitEagerMoveAttr (EagerMoveAttr *attr) {
7496- if (visitLifetimeAttr (attr))
7496+ if (visitOwnershipAttr (attr))
74977497 return ;
74987498 if (auto *nominal = dyn_cast<NominalTypeDecl>(D)) {
74997499 if (nominal->getSelfTypeInContext ()->isNoncopyable ()) {
@@ -7517,7 +7517,7 @@ void AttributeChecker::visitEagerMoveAttr(EagerMoveAttr *attr) {
75177517}
75187518
75197519void AttributeChecker::visitNoEagerMoveAttr (NoEagerMoveAttr *attr) {
7520- if (visitLifetimeAttr (attr))
7520+ if (visitOwnershipAttr (attr))
75217521 return ;
75227522 // @_noEagerMove and @_eagerMove are opposites and can't be combined.
75237523 if (D->getAttrs ().hasAttribute <EagerMoveAttr>()) {
0 commit comments