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 {
75
75
// / of the given declaration.
76
76
static AvailabilityContext forDeclSignature (const Decl *decl);
77
77
78
+ // / Returns the unconstrained availability context.
79
+ static AvailabilityContext forAlwaysAvailable (const ASTContext &ctx);
80
+
78
81
// / Returns the range of platform versions which may execute code in the
79
82
// / availability context, starting at its introduction version.
80
83
// 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) {
214
214
return forLocation (decl->getLoc (), decl->getInnermostDeclContext ());
215
215
}
216
216
217
+ AvailabilityContext
218
+ AvailabilityContext::forAlwaysAvailable (const ASTContext &ctx) {
219
+ return AvailabilityContext (Storage::get (AvailabilityRange::alwaysAvailable (),
220
+ /* isDeprecated=*/ false ,
221
+ /* domainInfos=*/ {}, ctx));
222
+ }
223
+
217
224
AvailabilityRange AvailabilityContext::getPlatformRange () const {
218
225
return storage->platformRange ;
219
226
}
You can’t perform that action at this time.
0 commit comments