File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -625,6 +625,9 @@ class AvailableAttr : public DeclAttribute {
625
625
// / The platform of the availability.
626
626
const PlatformKind Platform;
627
627
628
+ // / Whether this is a language-version-specific entity.
629
+ bool isLanguageVersionSpecific () const ;
630
+
628
631
// / Whether this is an unconditionally unavailable entity.
629
632
bool isUnconditionallyUnavailable () const ;
630
633
Original file line number Diff line number Diff line change @@ -667,6 +667,19 @@ bool AvailableAttr::isActivePlatform(const ASTContext &ctx) const {
667
667
return isPlatformActive (Platform, ctx.LangOpts );
668
668
}
669
669
670
+ bool AvailableAttr::isLanguageVersionSpecific () const {
671
+ if (PlatformAgnostic ==
672
+ PlatformAgnosticAvailabilityKind::SwiftVersionSpecific)
673
+ {
674
+ assert (Platform == PlatformKind::none &&
675
+ (Introduced.hasValue () ||
676
+ Deprecated.hasValue () ||
677
+ Obsoleted.hasValue ()));
678
+ return true ;
679
+ }
680
+ return false ;
681
+ }
682
+
670
683
bool AvailableAttr::isUnconditionallyUnavailable () const {
671
684
switch (PlatformAgnostic) {
672
685
case PlatformAgnosticAvailabilityKind::None:
You can’t perform that action at this time.
0 commit comments