mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Introduce Decl::isSemanticallyUnavailable().
Adopt it in a few places as a replacement for `Decl::getSemanticUnavailableAttr()`.
This commit is contained in:
@@ -1455,9 +1455,15 @@ public:
|
||||
std::optional<std::pair<const AvailableAttr *, const Decl *>>
|
||||
getSemanticUnavailableAttr(bool ignoreAppExtensions = false) const;
|
||||
|
||||
/// Returns true if the decl is effectively always unavailable in the current
|
||||
/// compilation context. This query differs from \c isUnavailable() because it
|
||||
/// takes the availability of parent declarations into account.
|
||||
bool isSemanticallyUnavailable() const;
|
||||
|
||||
/// Returns true if code associated with this declaration should be considerd
|
||||
/// unreachable at runtime because the declaration is unavailable in all
|
||||
/// execution contexts in which the code may run.
|
||||
/// execution contexts in which the code may run. This result takes the
|
||||
/// availability of parent declarations into account.
|
||||
bool isUnreachableAtRuntime() const;
|
||||
|
||||
/// Returns true if this declaration should be considered available during
|
||||
|
||||
Reference in New Issue
Block a user