@@ -6648,20 +6648,19 @@ static void addUnavailableAttrs(ExtensionDecl *ext, NominalTypeDecl *nominal) {
6648
6648
? enclosing->getDeclContext ()->getAsDecl ()
6649
6649
: nullptr ) {
6650
6650
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)
6655
6654
continue ;
6656
6655
6657
6656
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),
6663
6662
SourceRange (), PlatformAgnosticAvailabilityKind::Unavailable,
6664
- /* Implicit=*/ true , available->isSPI ());
6663
+ /* Implicit=*/ true , available. getParsedAttr () ->isSPI ());
6665
6664
ext->getAttrs ().add (attr);
6666
6665
anyPlatformSpecificAttrs = true ;
6667
6666
}
0 commit comments