Skip to content

Swift: extract still unextracted entities from the 6.0.2 upgrade #19299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion swift/extractor/infra/SwiftTagTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ MAP(swift::Expr, ExprTag)
MAP(swift::ConsumeExpr, ConsumeExprTag)
MAP(swift::MaterializePackExpr, MaterializePackExprTag)
MAP(swift::SingleValueStmtExpr, SingleValueStmtExprTag)
MAP(swift::ExtractFunctionIsolationExpr, void) // TODO swift 6.0
MAP(swift::ExtractFunctionIsolationExpr, ExtractFunctionIsolationExprTag)
MAP(swift::CurrentContextIsolationExpr, void) // TODO swift 6.0
MAP(swift::Decl, DeclTag)
MAP(swift::ValueDecl, ValueDeclTag)
Expand Down
7 changes: 7 additions & 0 deletions swift/extractor/translators/ExprTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,11 @@ codeql::MaterializePackExpr ExprTranslator::translateMaterializePackExpr(
return entry;
}

codeql::ExtractFunctionIsolationExpr ExprTranslator::translateExtractFunctionIsolationExpr(
const swift::ExtractFunctionIsolationExpr& expr) {
auto entry = createExprEntry(expr);
entry.function_expr = dispatcher.fetchLabel(expr.getFunctionExpr());
return entry;
}

} // namespace codeql
2 changes: 2 additions & 0 deletions swift/extractor/translators/ExprTranslator.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class ExprTranslator : public AstTranslatorBase<ExprTranslator> {
codeql::CopyExpr translateCopyExpr(const swift::CopyExpr& expr);
codeql::ConsumeExpr translateConsumeExpr(const swift::ConsumeExpr& expr);
codeql::MaterializePackExpr translateMaterializePackExpr(const swift::MaterializePackExpr& expr);
codeql::ExtractFunctionIsolationExpr translateExtractFunctionIsolationExpr(
const swift::ExtractFunctionIsolationExpr& expr);

private:
void fillClosureExpr(const swift::AbstractClosureExpr& expr, codeql::ClosureExpr& entry);
Expand Down
16 changes: 11 additions & 5 deletions swift/ql/.generated.list

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions swift/ql/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions swift/ql/lib/codeql/swift/elements.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions swift/ql/lib/codeql/swift/generated/ParentChild.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions swift/ql/lib/codeql/swift/generated/Raw.qll

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading