Skip to content

Commit 4c7847f

Browse files
committed
[NFC] Rename helper function for @_noImplicitCopy and @_eagerMove
1 parent 1cc49b4 commit 4c7847f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ class AttributeChecker : public AttributeVisitor<AttributeChecker> {
362362

363363
void visitUnsafeInheritExecutorAttr(UnsafeInheritExecutorAttr *attr);
364364

365-
bool visitLifetimeAttr(DeclAttribute *attr);
365+
bool visitOwnershipAttr(DeclAttribute *attr);
366366
void visitEagerMoveAttr(EagerMoveAttr *attr);
367367
void visitNoEagerMoveAttr(NoEagerMoveAttr *attr);
368368

@@ -402,7 +402,7 @@ void AttributeChecker::visitNoImplicitCopyAttr(NoImplicitCopyAttr *attr) {
402402
}
403403

404404
if (auto *funcDecl = dyn_cast<FuncDecl>(D)) {
405-
if (visitLifetimeAttr(attr))
405+
if (visitOwnershipAttr(attr))
406406
return;
407407

408408
// We only handle non-lvalue arguments today.
@@ -7492,7 +7492,7 @@ void AttributeChecker::visitUnsafeInheritExecutorAttr(
74927492
}
74937493
}
74947494

7495-
bool AttributeChecker::visitLifetimeAttr(DeclAttribute *attr) {
7495+
bool AttributeChecker::visitOwnershipAttr(DeclAttribute *attr) {
74967496
if (auto *funcDecl = dyn_cast<FuncDecl>(D)) {
74977497
auto declContext = funcDecl->getDeclContext();
74987498
// eagerMove attribute may only appear in type context
@@ -7505,7 +7505,7 @@ bool AttributeChecker::visitLifetimeAttr(DeclAttribute *attr) {
75057505
}
75067506

75077507
void AttributeChecker::visitEagerMoveAttr(EagerMoveAttr *attr) {
7508-
if (visitLifetimeAttr(attr))
7508+
if (visitOwnershipAttr(attr))
75097509
return;
75107510
if (auto *nominal = dyn_cast<NominalTypeDecl>(D)) {
75117511
if (nominal->getSelfTypeInContext()->isNoncopyable()) {
@@ -7529,7 +7529,7 @@ void AttributeChecker::visitEagerMoveAttr(EagerMoveAttr *attr) {
75297529
}
75307530

75317531
void AttributeChecker::visitNoEagerMoveAttr(NoEagerMoveAttr *attr) {
7532-
if (visitLifetimeAttr(attr))
7532+
if (visitOwnershipAttr(attr))
75337533
return;
75347534
// @_noEagerMove and @_eagerMove are opposites and can't be combined.
75357535
if (D->getAttrs().hasAttribute<EagerMoveAttr>()) {

0 commit comments

Comments
 (0)