@@ -1378,16 +1378,29 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl>, public Swi
13781378 // / @_originalDefinedIn attribute, this function returns this module name.
13791379 StringRef getAlternateModuleName () const ;
13801380
1381- // Is this Decl an SPI? It can be directly marked with @_spi or is defined in
1382- // an @_spi context.
1381+ // / Is this Decl an SPI? It can be directly marked with @_spi or is defined in
1382+ // / an @_spi context.
13831383 bool isSPI () const ;
13841384
1385+ // / Returns true if the attribute providing the platform availability
1386+ // / introduction for this decl is an `@_spi_available` attribute.
13851387 bool isAvailableAsSPI () const ;
13861388
13871389 // / Determine whether this Decl has either Private or FilePrivate access,
13881390 // / and its DeclContext does not.
13891391 bool isOutermostPrivateOrFilePrivateScope () const ;
13901392
1393+ // / Returns true if the decl is always unavailable in this compilation
1394+ // / context. For example, the decl could be marked explicitly unavailable on
1395+ // / either the current platform or in the current language mode. Returns false
1396+ // / for declarations that are only _potentially_ unavailable because of a
1397+ // / condition that could be satisfied at runtime (like requiring an operating
1398+ // / system version that is higher than the current deployment target).
1399+ // /
1400+ // / Note that this query only considers the attributes that are attached
1401+ // / directly to this decl (or the extension it is declared in, if applicable).
1402+ bool isUnavailable () const ;
1403+
13911404 // / Retrieve the @available attribute that provides the OS version range that
13921405 // / this declaration is available in.
13931406 // /
@@ -1406,7 +1419,7 @@ class alignas(1 << DeclAlignInBits) Decl : public ASTAllocated<Decl>, public Swi
14061419 // / the attribute.
14071420 // /
14081421 // / Note that this notion of unavailability is broader than that which is
1409- // / checked by \c AvailableAttr:: isUnavailable.
1422+ // / checked by \c isUnavailable() .
14101423 std::optional<std::pair<const AvailableAttr *, const Decl *>>
14111424 getSemanticUnavailableAttr (bool ignoreAppExtensions = false ) const ;
14121425
0 commit comments