mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Introduce Decl::getSemanticAvailableAttrs().
This new attribute iterator returned from the query makes it simpler to implement algorithms that need access to both the `AvailableAttr *` and its corresponding `AvailabilityDomain`. This is also work towards making it possible to return an optional `AvailabilityDomain` from `Decl::getDomainForAvailableAttr()`.
This commit is contained in:
@@ -451,7 +451,9 @@ class InheritedProtocolCollector {
|
||||
|
||||
cache.emplace();
|
||||
while (D) {
|
||||
for (auto *nextAttr : D->getAttrs().getAttributes<AvailableAttr>()) {
|
||||
for (auto semanticAttr : D->getSemanticAvailableAttrs()) {
|
||||
auto nextAttr = semanticAttr.getParsedAttr();
|
||||
|
||||
// FIXME: This is just approximating the effects of nested availability
|
||||
// attributes for the same platform; formally they'd need to be merged.
|
||||
bool alreadyHasMoreSpecificAttrForThisPlatform =
|
||||
|
||||
Reference in New Issue
Block a user