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 {
10540
10540
return {};
10541
10541
}
10542
10542
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
+
10543
10571
StaticSpellingKind FuncDecl::getCorrectStaticSpelling () const {
10544
10572
assert (getDeclContext ()->isTypeContext ());
10545
10573
if (!isStatic ())
Original file line number Diff line number Diff line change @@ -938,34 +938,6 @@ buildIndexForwardingParamList(AbstractStorageDecl *storage,
938
938
return ParameterList::create (context, elements);
939
939
}
940
940
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
-
969
941
// / Build an argument list referencing the subscript parameters for this
970
942
// / subscript accessor.
971
943
static ArgumentList *buildSubscriptArgumentList (ASTContext &ctx,
You can’t perform that action at this time.
0 commit comments