Swift: Fix unavailability checks after 6.2 upgrade

This commit is contained in:
Jeroen Ketema
2025-09-16 14:42:27 +02:00
parent 2ef8bb0c53
commit 22dddb0216
2 changed files with 6 additions and 2 deletions

View File

@@ -170,7 +170,9 @@ static std::unordered_set<swift::ModuleDecl*> extractDeclarations(
bodyEmissionStrategy);
auto topLevelDecls = getTopLevelDecls(module, primaryFile, lazyDeclaration);
for (auto decl : topLevelDecls) {
// TODO: Swift 6.2 is unavailable
if (decl->isUnavailable()) {
continue;
}
visitor.extract(decl);
}
for (auto& comment : comments) {

View File

@@ -292,7 +292,9 @@ void DeclTranslator::fillTypeDecl(const swift::TypeDecl& decl, codeql::TypeDecl&
void DeclTranslator::fillIterableDeclContext(const swift::IterableDeclContext& decl,
codeql::Decl& entry) {
for (auto member : decl.getMembers()) {
// TODO: Swift 6.2 unavailable members
if (member->isUnavailable()) {
continue;
}
entry.members.emplace_back(dispatcher.fetchLabel(member));
}
}