@@ -6648,20 +6648,19 @@ static void addUnavailableAttrs(ExtensionDecl *ext, NominalTypeDecl *nominal) {
66486648 ? enclosing->getDeclContext ()->getAsDecl ()
66496649 : nullptr ) {
66506650 bool anyPlatformSpecificAttrs = false ;
6651- for (auto semanticAttr : enclosing->getSemanticAvailableAttrs ()) {
6652- auto available = semanticAttr.getParsedAttr ();
6653-
6654- if (available->getPlatform () == PlatformKind::none)
6651+ for (auto available : enclosing->getSemanticAvailableAttrs ()) {
6652+ // FIXME: [availability] Generalize to AvailabilityDomain.
6653+ if (available.getPlatform () == PlatformKind::none)
66556654 continue ;
66566655
66576656 auto attr = new (ctx) AvailableAttr (
6658- SourceLoc (), SourceRange (), available-> getPlatform (),
6659- available-> Message ,
6660- /* Rename=*/ " " , available-> Introduced .value_or (noVersion),
6661- SourceRange (), available-> Deprecated .value_or (noVersion),
6662- SourceRange (), available-> Obsoleted .value_or (noVersion),
6657+ SourceLoc (), SourceRange (), available. getPlatform (),
6658+ available. getMessage () ,
6659+ /* Rename=*/ " " , available. getIntroduced () .value_or (noVersion),
6660+ SourceRange (), available. getDeprecated () .value_or (noVersion),
6661+ SourceRange (), available. getObsoleted () .value_or (noVersion),
66636662 SourceRange (), PlatformAgnosticAvailabilityKind::Unavailable,
6664- /* Implicit=*/ true , available->isSPI ());
6663+ /* Implicit=*/ true , available. getParsedAttr () ->isSPI ());
66656664 ext->getAttrs ().add (attr);
66666665 anyPlatformSpecificAttrs = true ;
66676666 }
0 commit comments