Skip to content

Commit a0a012b

Browse files
committed
[NFC] Rename helper function for @_noImplicitCopy and @_eagerMove
1 parent f727fa1 commit a0a012b

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
@@ -342,7 +342,7 @@ class AttributeChecker : public AttributeVisitor<AttributeChecker> {
342342

343343
void visitUnsafeInheritExecutorAttr(UnsafeInheritExecutorAttr *attr);
344344

345-
bool visitLifetimeAttr(DeclAttribute *attr);
345+
bool visitOwnershipAttr(DeclAttribute *attr);
346346
void visitEagerMoveAttr(EagerMoveAttr *attr);
347347
void visitNoEagerMoveAttr(NoEagerMoveAttr *attr);
348348

@@ -382,7 +382,7 @@ void AttributeChecker::visitNoImplicitCopyAttr(NoImplicitCopyAttr *attr) {
382382
}
383383

384384
if (auto *funcDecl = dyn_cast<FuncDecl>(D)) {
385-
if (visitLifetimeAttr(attr))
385+
if (visitOwnershipAttr(attr))
386386
return;
387387

388388
// We only handle non-lvalue arguments today.
@@ -7436,7 +7436,7 @@ void AttributeChecker::visitUnsafeInheritExecutorAttr(
74367436
}
74377437
}
74387438

7439-
bool AttributeChecker::visitLifetimeAttr(DeclAttribute *attr) {
7439+
bool AttributeChecker::visitOwnershipAttr(DeclAttribute *attr) {
74407440
if (auto *funcDecl = dyn_cast<FuncDecl>(D)) {
74417441
auto declContext = funcDecl->getDeclContext();
74427442
// eagerMove attribute may only appear in type context
@@ -7449,7 +7449,7 @@ bool AttributeChecker::visitLifetimeAttr(DeclAttribute *attr) {
74497449
}
74507450

74517451
void AttributeChecker::visitEagerMoveAttr(EagerMoveAttr *attr) {
7452-
if (visitLifetimeAttr(attr))
7452+
if (visitOwnershipAttr(attr))
74537453
return;
74547454
if (auto *nominal = dyn_cast<NominalTypeDecl>(D)) {
74557455
if (nominal->getSelfTypeInContext()->isNoncopyable()) {
@@ -7473,7 +7473,7 @@ void AttributeChecker::visitEagerMoveAttr(EagerMoveAttr *attr) {
74737473
}
74747474

74757475
void AttributeChecker::visitNoEagerMoveAttr(NoEagerMoveAttr *attr) {
7476-
if (visitLifetimeAttr(attr))
7476+
if (visitOwnershipAttr(attr))
74777477
return;
74787478
// @_noEagerMove and @_eagerMove are opposites and can't be combined.
74797479
if (D->getAttrs().hasAttribute<EagerMoveAttr>()) {

0 commit comments

Comments
 (0)