diff --git a/swift/extractor/translators/DeclTranslator.cpp b/swift/extractor/translators/DeclTranslator.cpp index d7ec3c6cd1bf8..a74dc61942b6c 100644 --- a/swift/extractor/translators/DeclTranslator.cpp +++ b/swift/extractor/translators/DeclTranslator.cpp @@ -279,7 +279,12 @@ void DeclTranslator::fillTypeDecl(const swift::TypeDecl& decl, codeql::TypeDecl& void DeclTranslator::fillIterableDeclContext(const swift::IterableDeclContext& decl, codeql::Decl& entry) { - entry.members = dispatcher.fetchRepeatedLabels(decl.getAllMembers()); + for (auto member : decl.getMembers()) { + if (swift::AvailableAttr::isUnavailable(member)) { + continue; + } + entry.members.emplace_back(dispatcher.fetchLabel(member)); + } } void DeclTranslator::fillVarDecl(const swift::VarDecl& decl, codeql::VarDecl& entry) {