Skip to content

Commit 1c75e5b

Browse files
committed
Swift: add database migration scripts for move semantics
1 parent 031f453 commit 1c75e5b

File tree

7 files changed

+10848
-0
lines changed

7 files changed

+10848
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
class Element extends @element {
2+
string toString() { none() }
3+
}
4+
5+
query predicate new_unspecified_elements(Element e, string property, string error) {
6+
unspecified_elements(e, property, error)
7+
or
8+
error =
9+
"Move semantics support removed during database downgrade. Please update your CodeQL code." and
10+
property = "" and
11+
(
12+
copy_exprs(e, _) or
13+
consume_exprs(e, _) or
14+
borrow_exprs(e)
15+
)
16+
}
17+
18+
query predicate new_unspecified_element_children(Element e, int index, Element child) {
19+
unspecified_element_children(e, index, child)
20+
or
21+
copy_exprs(e, child) and index = 0
22+
or
23+
consume_exprs(e, child) and index = 0
24+
or
25+
borrow_exprs(e) and identity_exprs(e, child) and index = 0
26+
}
27+
28+
query predicate new_identity_exprs(Element e, Element child) {
29+
identity_exprs(e, child) and not borrow_exprs(e)
30+
}

0 commit comments

Comments
 (0)