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 all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
class Element extends @element {
string toString() { none() }
}

predicate removedClass(Element e, string name, Element child) {
current_context_isolation_exprs(e, child) and name = "CurrentContextIsolationExpr"
or
extract_function_isolation_exprs(e, child) and name = "ExtractFunctionIsolationExpr"
or
(
actor_isolation_erasure_exprs(e) and name = "ActorIsolationErasureExpr"
or
unreachable_exprs(e) and name = "UnreachableExpr"
) and
implicit_conversion_exprs(e, child)
}

query predicate new_unspecified_elements(Element e, string property, string error) {
unspecified_elements(e, property, error)
or
exists(string name |
removedClass(e, name, _) and
property = "" and
error = name + " nodes removed during database downgrade. Please update your CodeQL code."
)
}

query predicate new_unspecified_element_children(Element e, int index, Element child) {
unspecified_element_children(e, index, child)
or
removedClass(e, _, child) and index = 0
}

query predicate new_implicit_conversion_exprs(Element e, Element child) {
implicit_conversion_exprs(e, child) and not removedClass(e, _, _)
}

query predicate new_expr_types(Element e, Element type) {
expr_types(e, type) and not removedClass(e, _, _)
}
Loading
Loading