Skip to content

Commit

Permalink
Swift: skip unavailable decl members
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Denisov committed Oct 10, 2023
1 parent 551bd18 commit 645a3d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion swift/extractor/translators/DeclTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 645a3d6

Please sign in to comment.