@@ -2418,8 +2418,6 @@ namespace {
24182418 }
24192419 }
24202420
2421-
2422-
24232421 result->setMemberLoader (&Impl, 0 );
24242422 return result;
24252423 }
@@ -2437,54 +2435,77 @@ namespace {
24372435 if (operationFn->getParameters ()->size () != 1 )
24382436 return false ;
24392437
2440- if (operationFn->getParameters ()->get (0 )->getInterfaceType ()->isEqual (classDecl->getInterfaceType ()))
2438+ if (operationFn->getParameters ()->get (0 )->getInterfaceType ()->isEqual (
2439+ classDecl->getInterfaceType ()))
24412440 return false ;
24422441
24432442 return true ;
24442443 };
24452444
24462445 auto retainOperation = evaluateOrDefault (
24472446 Impl.SwiftContext .evaluator ,
2448- CustomRefCountingOperation ({classDecl, CustomRefCountingOperationKind::retain}), {});
2449- if (retainOperation.kind == CustomRefCountingOperationResult::noAttribute) {
2447+ CustomRefCountingOperation (
2448+ {classDecl, CustomRefCountingOperationKind::retain}),
2449+ {});
2450+ if (retainOperation.kind ==
2451+ CustomRefCountingOperationResult::noAttribute) {
24502452 HeaderLoc loc (decl->getLocation ());
2451- Impl.diagnose (loc, diag::reference_type_must_have_retain_attr, decl->getNameAsString ());
2452- } else if (retainOperation.kind == CustomRefCountingOperationResult::notFound) {
2453+ Impl.diagnose (loc, diag::reference_type_must_have_retain_attr,
2454+ decl->getNameAsString ());
2455+ } else if (retainOperation.kind ==
2456+ CustomRefCountingOperationResult::notFound) {
24532457 HeaderLoc loc (decl->getLocation ());
2454- Impl.diagnose (loc, diag::foreign_reference_types_cannot_find_retain, retainOperation.name , decl->getNameAsString ());
2455- } else if (retainOperation.kind == CustomRefCountingOperationResult::tooManyFound) {
2458+ Impl.diagnose (loc, diag::foreign_reference_types_cannot_find_retain,
2459+ retainOperation.name , decl->getNameAsString ());
2460+ } else if (retainOperation.kind ==
2461+ CustomRefCountingOperationResult::tooManyFound) {
24562462 HeaderLoc loc (decl->getLocation ());
2457- Impl.diagnose (loc, diag::too_many_reference_type_retain_operations, retainOperation.name , decl->getNameAsString ());
2458- } else if (retainOperation.kind == CustomRefCountingOperationResult::foundOperation) {
2463+ Impl.diagnose (loc, diag::too_many_reference_type_retain_operations,
2464+ retainOperation.name , decl->getNameAsString ());
2465+ } else if (retainOperation.kind ==
2466+ CustomRefCountingOperationResult::foundOperation) {
24592467 if (!isValidOperation (retainOperation.operation )) {
24602468 HeaderLoc loc (decl->getLocation ());
2461- Impl.diagnose (loc, diag::foreign_reference_types_invalid_retain, retainOperation.name , decl->getNameAsString ());
2469+ Impl.diagnose (loc, diag::foreign_reference_types_invalid_retain,
2470+ retainOperation.name , decl->getNameAsString ());
24622471 }
24632472 } else {
24642473 // Nothing to do.
2465- assert (retainOperation.kind == CustomRefCountingOperationResult::immortal);
2474+ assert (retainOperation.kind ==
2475+ CustomRefCountingOperationResult::immortal);
24662476 }
24672477
24682478 auto releaseOperation = evaluateOrDefault (
24692479 Impl.SwiftContext .evaluator ,
2470- CustomRefCountingOperation ({classDecl, CustomRefCountingOperationKind::release}), {});
2471- if (releaseOperation.kind == CustomRefCountingOperationResult::noAttribute) {
2480+ CustomRefCountingOperation (
2481+ {classDecl, CustomRefCountingOperationKind::release}),
2482+ {});
2483+ if (releaseOperation.kind ==
2484+ CustomRefCountingOperationResult::noAttribute) {
24722485 HeaderLoc loc (decl->getLocation ());
2473- Impl.diagnose (loc, diag::reference_type_must_have_release_attr, decl->getNameAsString ());
2474- } else if (releaseOperation.kind == CustomRefCountingOperationResult::notFound) {
2486+ Impl.diagnose (loc, diag::reference_type_must_have_release_attr,
2487+ decl->getNameAsString ());
2488+ } else if (releaseOperation.kind ==
2489+ CustomRefCountingOperationResult::notFound) {
24752490 HeaderLoc loc (decl->getLocation ());
2476- Impl.diagnose (loc, diag::foreign_reference_types_cannot_find_release, releaseOperation.name , decl->getNameAsString ());
2477- } else if (releaseOperation.kind == CustomRefCountingOperationResult::tooManyFound) {
2491+ Impl.diagnose (loc, diag::foreign_reference_types_cannot_find_release,
2492+ releaseOperation.name , decl->getNameAsString ());
2493+ } else if (releaseOperation.kind ==
2494+ CustomRefCountingOperationResult::tooManyFound) {
24782495 HeaderLoc loc (decl->getLocation ());
2479- Impl.diagnose (loc, diag::too_many_reference_type_release_operations, releaseOperation.name , decl->getNameAsString ());
2480- } else if (releaseOperation.kind == CustomRefCountingOperationResult::foundOperation) {
2496+ Impl.diagnose (loc, diag::too_many_reference_type_release_operations,
2497+ releaseOperation.name , decl->getNameAsString ());
2498+ } else if (releaseOperation.kind ==
2499+ CustomRefCountingOperationResult::foundOperation) {
24812500 if (!isValidOperation (releaseOperation.operation )) {
24822501 HeaderLoc loc (decl->getLocation ());
2483- Impl.diagnose (loc, diag::foreign_reference_types_invalid_release, releaseOperation.name , decl->getNameAsString ());
2502+ Impl.diagnose (loc, diag::foreign_reference_types_invalid_release,
2503+ releaseOperation.name , decl->getNameAsString ());
24842504 }
24852505 } else {
24862506 // Nothing to do.
2487- assert (releaseOperation.kind == CustomRefCountingOperationResult::immortal);
2507+ assert (releaseOperation.kind ==
2508+ CustomRefCountingOperationResult::immortal);
24882509 }
24892510 }
24902511
0 commit comments