AST: Use an accessor to get the PlatformKind from an AvailableAttr.

This commit is contained in:
Allan Shortlidge
2024-11-20 21:21:38 -08:00
parent 8a78496368
commit 36230cd9c6
19 changed files with 68 additions and 57 deletions

View File

@@ -456,8 +456,8 @@ class InheritedProtocolCollector {
// attributes for the same platform; formally they'd need to be merged.
bool alreadyHasMoreSpecificAttrForThisPlatform =
llvm::any_of(*cache, [nextAttr](const AvailableAttr *existingAttr) {
return existingAttr->Platform == nextAttr->Platform;
});
return existingAttr->getPlatform() == nextAttr->getPlatform();
});
if (alreadyHasMoreSpecificAttrForThisPlatform)
continue;
cache->push_back(nextAttr);