File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -3197,6 +3197,9 @@ class SemanticAvailableAttr final {
31973197 // / `PlatformKind::none` if the attribute is not platform specific.
31983198 PlatformKind getPlatformKind () const { return getDomain ().getPlatformKind (); }
31993199
3200+ // / Whether this is a `noasync` attribute.
3201+ bool isNoAsync () const { return attr->isNoAsync (); }
3202+
32003203 // / Whether this attribute has an introduced, deprecated, or obsoleted
32013204 // / version.
32023205 bool isVersionSpecific () const {
Original file line number Diff line number Diff line change @@ -588,8 +588,7 @@ const AvailableAttr *Decl::getNoAsyncAttr() const {
588588 getSemanticAvailableAttrs (/* includingInactive=*/ false )) {
589589 auto attr = semanticAttr.getParsedAttr ();
590590
591- if (attr->getPlatformAgnosticAvailability () !=
592- PlatformAgnosticAvailabilityKind::NoAsync)
591+ if (!semanticAttr.isNoAsync ())
593592 continue ;
594593
595594 if (!bestAttr) {
Original file line number Diff line number Diff line change @@ -9278,16 +9278,14 @@ AbstractFunctionDecl *AbstractFunctionDecl::getAsyncAlternative() const {
92789278 // `getAttrs` is in reverse source order, so the last attribute is the
92799279 // first in source.
92809280 AbstractFunctionDecl *alternative = nullptr ;
9281- for (auto semanticAttr : getSemanticAvailableAttrs ()) {
9282- auto attr = semanticAttr.getParsedAttr ();
9283-
9284- if (attr->isNoAsync ())
9281+ for (auto attr : getSemanticAvailableAttrs ()) {
9282+ if (attr.isNoAsync ())
92859283 continue ;
92869284
9287- if (attr-> getPlatform () != PlatformKind::none && alternative != nullptr )
9285+ if (attr. isPlatformSpecific () && alternative != nullptr )
92889286 continue ;
92899287
9290- if (auto *renamedDecl = getRenamedDecl (attr)) {
9288+ if (auto *renamedDecl = getRenamedDecl (attr. getParsedAttr () )) {
92919289 if (auto *afd = dyn_cast<AbstractFunctionDecl>(renamedDecl)) {
92929290 if (afd->hasAsync ())
92939291 alternative = afd;
You can’t perform that action at this time.
0 commit comments