File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,9 @@ class AvailabilityContext {
7575 // / of the given declaration.
7676 static AvailabilityContext forDeclSignature (const Decl *decl);
7777
78+ // / Returns the unconstrained availability context.
79+ static AvailabilityContext forAlwaysAvailable (const ASTContext &ctx);
80+
7881 // / Returns the range of platform versions which may execute code in the
7982 // / availability context, starting at its introduction version.
8083 // FIXME: [availability] Remove; superseded by getAvailableRange().
Original file line number Diff line number Diff line change @@ -214,6 +214,13 @@ AvailabilityContext AvailabilityContext::forDeclSignature(const Decl *decl) {
214214 return forLocation (decl->getLoc (), decl->getInnermostDeclContext ());
215215}
216216
217+ AvailabilityContext
218+ AvailabilityContext::forAlwaysAvailable (const ASTContext &ctx) {
219+ return AvailabilityContext (Storage::get (AvailabilityRange::alwaysAvailable (),
220+ /* isDeprecated=*/ false ,
221+ /* domainInfos=*/ {}, ctx));
222+ }
223+
217224AvailabilityRange AvailabilityContext::getPlatformRange () const {
218225 return storage->platformRange ;
219226}
You can’t perform that action at this time.
0 commit comments