File tree Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -10540,6 +10540,34 @@ ArrayRef<VarDecl *> AccessorDecl::getAccessedProperties() const {
1054010540 return {};
1054110541}
1054210542
10543+ bool AccessorDecl::doesAccessorHaveBody () const {
10544+ auto *accessor = this ;
10545+ auto *storage = accessor->getStorage ();
10546+
10547+ if (isa<ProtocolDecl>(accessor->getDeclContext ())) {
10548+ if (!accessor->getASTContext ().LangOpts .hasFeature (
10549+ Feature::CoroutineAccessors)) {
10550+ return false ;
10551+ }
10552+ if (!requiresFeatureCoroutineAccessors (accessor->getAccessorKind ())) {
10553+ return false ;
10554+ }
10555+ if (storage->getOverrideLoc ()) {
10556+ return false ;
10557+ }
10558+ return accessor->getStorage ()
10559+ ->requiresCorrespondingUnderscoredCoroutineAccessor (
10560+ accessor->getAccessorKind (), accessor);
10561+ }
10562+
10563+ // NSManaged getters and setters don't have bodies.
10564+ if (storage->getAttrs ().hasAttribute <NSManagedAttr>(/* AllowInvalid=*/ true ))
10565+ if (accessor->isGetterOrSetter ())
10566+ return false ;
10567+
10568+ return true ;
10569+ }
10570+
1054310571StaticSpellingKind FuncDecl::getCorrectStaticSpelling () const {
1054410572 assert (getDeclContext ()->isTypeContext ());
1054510573 if (!isStatic ())
Original file line number Diff line number Diff line change @@ -938,34 +938,6 @@ buildIndexForwardingParamList(AbstractStorageDecl *storage,
938938 return ParameterList::create (context, elements);
939939}
940940
941- bool AccessorDecl::doesAccessorHaveBody () const {
942- auto *accessor = this ;
943- auto *storage = accessor->getStorage ();
944-
945- if (isa<ProtocolDecl>(accessor->getDeclContext ())) {
946- if (!accessor->getASTContext ().LangOpts .hasFeature (
947- Feature::CoroutineAccessors)) {
948- return false ;
949- }
950- if (!requiresFeatureCoroutineAccessors (accessor->getAccessorKind ())) {
951- return false ;
952- }
953- if (storage->getOverrideLoc ()) {
954- return false ;
955- }
956- return accessor->getStorage ()
957- ->requiresCorrespondingUnderscoredCoroutineAccessor (
958- accessor->getAccessorKind (), accessor);
959- }
960-
961- // NSManaged getters and setters don't have bodies.
962- if (storage->getAttrs ().hasAttribute <NSManagedAttr>(/* AllowInvalid=*/ true ))
963- if (accessor->isGetterOrSetter ())
964- return false ;
965-
966- return true ;
967- }
968-
969941// / Build an argument list referencing the subscript parameters for this
970942// / subscript accessor.
971943static ArgumentList *buildSubscriptArgumentList (ASTContext &ctx,
You can’t perform that action at this time.
0 commit comments