Skip to content

Commit afad02e

Browse files
committed
AST: Adopt AvailableAttr::isLanguageVersionSpecific().
1 parent 2e03ba2 commit afad02e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/AST/Attr.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,7 @@ DeclAttributes::isUnavailableInSwiftVersion(
379379
if (available->isInvalid())
380380
continue;
381381

382-
if (available->getPlatformAgnosticAvailability() ==
383-
PlatformAgnosticAvailabilityKind::SwiftVersionSpecific) {
382+
if (available->isLanguageVersionSpecific()) {
384383
if (available->Introduced.has_value() &&
385384
available->Introduced.value() > vers)
386385
return true;

lib/Sema/TypeCheckDeclPrimary.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,8 +916,7 @@ CheckRedeclarationRequest::evaluate(Evaluator &eval, ValueDecl *current,
916916
static AvailabilityRange from(const ValueDecl *VD) {
917917
AvailabilityRange result;
918918
for (auto *attr : VD->getAttrs().getAttributes<AvailableAttr>()) {
919-
if (attr->getPlatformAgnosticAvailability() ==
920-
PlatformAgnosticAvailabilityKind::SwiftVersionSpecific) {
919+
if (attr->isLanguageVersionSpecific()) {
921920
if (attr->Introduced)
922921
result.introduced = attr->Introduced;
923922
if (attr->Obsoleted)

0 commit comments

Comments
 (0)