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 {
3197
3197
// / `PlatformKind::none` if the attribute is not platform specific.
3198
3198
PlatformKind getPlatformKind () const { return getDomain ().getPlatformKind (); }
3199
3199
3200
+ // / Whether this is a `noasync` attribute.
3201
+ bool isNoAsync () const { return attr->isNoAsync (); }
3202
+
3200
3203
// / Whether this attribute has an introduced, deprecated, or obsoleted
3201
3204
// / version.
3202
3205
bool isVersionSpecific () const {
Original file line number Diff line number Diff line change @@ -588,8 +588,7 @@ const AvailableAttr *Decl::getNoAsyncAttr() const {
588
588
getSemanticAvailableAttrs (/* includingInactive=*/ false )) {
589
589
auto attr = semanticAttr.getParsedAttr ();
590
590
591
- if (attr->getPlatformAgnosticAvailability () !=
592
- PlatformAgnosticAvailabilityKind::NoAsync)
591
+ if (!semanticAttr.isNoAsync ())
593
592
continue ;
594
593
595
594
if (!bestAttr) {
Original file line number Diff line number Diff line change @@ -9278,16 +9278,14 @@ AbstractFunctionDecl *AbstractFunctionDecl::getAsyncAlternative() const {
9278
9278
// `getAttrs` is in reverse source order, so the last attribute is the
9279
9279
// first in source.
9280
9280
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 ())
9285
9283
continue ;
9286
9284
9287
- if (attr-> getPlatform () != PlatformKind::none && alternative != nullptr )
9285
+ if (attr. isPlatformSpecific () && alternative != nullptr )
9288
9286
continue ;
9289
9287
9290
- if (auto *renamedDecl = getRenamedDecl (attr)) {
9288
+ if (auto *renamedDecl = getRenamedDecl (attr. getParsedAttr () )) {
9291
9289
if (auto *afd = dyn_cast<AbstractFunctionDecl>(renamedDecl)) {
9292
9290
if (afd->hasAsync ())
9293
9291
alternative = afd;
You can’t perform that action at this time.
0 commit comments