Skip to content

Commit 71f92db

Browse files
committed
Swift: Update expected test results after 6.2 update
1 parent 33a97fe commit 71f92db

File tree

8 files changed

+103
-90
lines changed

8 files changed

+103
-90
lines changed

swift/ql/test/extractor-tests/generated/decl/CapturedDecl/PrintAst.expected

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,16 @@ closures.swift:
222222
# 39| getExpr(): [IntegerLiteralExpr] 1
223223
# 39| getResult().getFullyConverted(): [AwaitExpr] await ...
224224
# 39| getCapture(0): [CapturedDecl] callback
225-
# 41| getElement(1): [CallExpr] call to Task<Success, Never>.init(priority:operation:)
226-
# 41| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(priority:operation:)
225+
# 41| getElement(1): [CallExpr] call to Task<Success, Never>.init(name:priority:operation:)
226+
# 41| getFunction(): [MethodLookupExpr] Task<Success, Never>.init(name:priority:operation:)
227227
# 41| getBase(): [TypeExpr] Task<(), Never>.Type
228228
# 41| getTypeRepr(): [TypeRepr] Task<(), Never>
229-
# 41| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(priority:operation:)
230-
# 41| getArgument(0): [Argument] priority: default priority
229+
# 41| getMethodRef(): [DeclRefExpr] Task<Success, Never>.init(name:priority:operation:)
230+
# 41| getArgument(0): [Argument] name: default name
231+
# 41| getExpr(): [DefaultArgumentExpr] default name
232+
# 41| getArgument(1): [Argument] priority: default priority
231233
# 41| getExpr(): [DefaultArgumentExpr] default priority
232-
# 41| getArgument(1): [Argument] operation: { ... }
234+
# 41| getArgument(2): [Argument] operation: { ... }
233235
# 41| getExpr(): [ExplicitClosureExpr] { ... }
234236
# 41| getBody(): [BraceStmt] { ... }
235237
# 42| getElement(0): [ReturnStmt] return ...
@@ -270,6 +272,7 @@ closures.swift:
270272
# 46| getArgument(1): [Argument] : 1
271273
# 46| getExpr(): [IntegerLiteralExpr] 1
272274
# 41| [NilLiteralExpr] nil
275+
# 41| [NilLiteralExpr] nil
273276
# 50| [NamedFunction] foo()
274277
# 50| InterfaceType = () -> Int
275278
# 50| getBody(): [BraceStmt] { ... }

swift/ql/test/library-tests/ast/PrintAst.expected

Lines changed: 43 additions & 40 deletions
Large diffs are not rendered by default.

swift/ql/test/library-tests/controlflow/graph/Cfg.expected

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@
124124
| cfg.swift:40:11:40:11 | "..." | cfg.swift:40:11:40:11 | (Any) ... | |
125125
| cfg.swift:40:11:40:11 | (Any) ... | cfg.swift:40:11:40:11 | [...] | |
126126
| cfg.swift:40:11:40:11 | OpaqueValueExpr | cfg.swift:40:12:40:12 | .appendLiteral(_:) | |
127-
| cfg.swift:40:11:40:11 | Unknown error | cfg.swift:40:12:40:11 | call to appendLiteral(_:) | |
127+
| cfg.swift:40:11:40:11 | Unknown error | cfg.swift:40:12:40:12 | call to appendLiteral(_:) | |
128128
| cfg.swift:40:11:40:11 | [...] | cfg.swift:40:10:40:10 | default separator | |
129129
| cfg.swift:40:11:40:11 | [...] | cfg.swift:40:11:40:11 | [...] | |
130130
| cfg.swift:40:11:40:34 | TapExpr | cfg.swift:40:11:40:11 | "..." | |
131-
| cfg.swift:40:12:40:11 | call to appendLiteral(_:) | cfg.swift:40:27:40:27 | .appendInterpolation(_:) | |
132131
| cfg.swift:40:12:40:12 | $interpolation | cfg.swift:40:12:40:12 | &... | |
133132
| cfg.swift:40:12:40:12 | &... | cfg.swift:40:11:40:11 | Unknown error | |
134133
| cfg.swift:40:12:40:12 | .appendLiteral(_:) | cfg.swift:40:12:40:12 | $interpolation | |
134+
| cfg.swift:40:12:40:12 | call to appendLiteral(_:) | cfg.swift:40:27:40:27 | .appendInterpolation(_:) | |
135135
| cfg.swift:40:27:40:27 | $interpolation | cfg.swift:40:27:40:27 | &... | |
136136
| cfg.swift:40:27:40:27 | &... | cfg.swift:40:28:40:28 | error | |
137137
| cfg.swift:40:27:40:27 | .appendInterpolation(_:) | cfg.swift:40:27:40:27 | $interpolation | |
@@ -472,10 +472,10 @@
472472
| cfg.swift:138:3:138:22 | for ... in ... { ... } | cfg.swift:140:3:148:3 | switch x { ... } | empty |
473473
| cfg.swift:138:7:138:7 | _ | cfg.swift:138:19:138:22 | { ... } | match |
474474
| cfg.swift:138:12:138:12 | 0 | cfg.swift:138:16:138:16 | 10 | |
475-
| cfg.swift:138:12:138:12 | $generator | cfg.swift:138:12:138:16 | .makeIterator() | match |
476-
| cfg.swift:138:12:138:16 | ... ....(_:_:) ... | cfg.swift:138:12:138:16 | call to makeIterator() | |
477-
| cfg.swift:138:12:138:16 | .makeIterator() | cfg.swift:138:13:138:13 | ....(_:_:) | |
478-
| cfg.swift:138:12:138:16 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
475+
| cfg.swift:138:12:138:12 | $generator | cfg.swift:138:12:138:12 | .makeIterator() | match |
476+
| cfg.swift:138:12:138:12 | .makeIterator() | cfg.swift:138:13:138:13 | ....(_:_:) | |
477+
| cfg.swift:138:12:138:12 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
478+
| cfg.swift:138:12:138:16 | ... ....(_:_:) ... | cfg.swift:138:12:138:12 | call to makeIterator() | |
479479
| cfg.swift:138:13:138:13 | ....(_:_:) | cfg.swift:138:13:138:13 | Int.Type | |
480480
| cfg.swift:138:13:138:13 | Int.Type | cfg.swift:138:12:138:12 | 0 | |
481481
| cfg.swift:138:16:138:16 | 10 | cfg.swift:138:12:138:16 | ... ....(_:_:) ... | |
@@ -896,14 +896,14 @@
896896
| cfg.swift:262:25:262:29 | x | cfg.swift:262:34:262:38 | y | |
897897
| cfg.swift:262:34:262:38 | y | cfg.swift:263:10:263:10 | OpaqueValueExpr | |
898898
| cfg.swift:263:3:263:10 | return ... | cfg.swift:262:1:264:1 | exit interpolatedString(x:y:) (normal) | return |
899-
| cfg.swift:263:10:263:10 | | cfg.swift:263:11:263:10 | call to appendLiteral(_:) | |
899+
| cfg.swift:263:10:263:10 | | cfg.swift:263:11:263:11 | call to appendLiteral(_:) | |
900900
| cfg.swift:263:10:263:10 | "..." | cfg.swift:263:3:263:10 | return ... | |
901901
| cfg.swift:263:10:263:10 | OpaqueValueExpr | cfg.swift:263:11:263:11 | .appendLiteral(_:) | |
902902
| cfg.swift:263:10:263:79 | TapExpr | cfg.swift:263:10:263:10 | "..." | |
903-
| cfg.swift:263:11:263:10 | call to appendLiteral(_:) | cfg.swift:263:12:263:12 | .appendInterpolation(_:) | |
904903
| cfg.swift:263:11:263:11 | $interpolation | cfg.swift:263:11:263:11 | &... | |
905904
| cfg.swift:263:11:263:11 | &... | cfg.swift:263:10:263:10 | | |
906905
| cfg.swift:263:11:263:11 | .appendLiteral(_:) | cfg.swift:263:11:263:11 | $interpolation | |
906+
| cfg.swift:263:11:263:11 | call to appendLiteral(_:) | cfg.swift:263:12:263:12 | .appendInterpolation(_:) | |
907907
| cfg.swift:263:12:263:12 | $interpolation | cfg.swift:263:12:263:12 | &... | |
908908
| cfg.swift:263:12:263:12 | &... | cfg.swift:263:13:263:13 | x | |
909909
| cfg.swift:263:12:263:12 | .appendInterpolation(_:) | cfg.swift:263:12:263:12 | $interpolation | |
@@ -2002,12 +2002,13 @@
20022002
| cfg.swift:523:78:531:5 | exit { ... } (normal) | cfg.swift:523:78:531:5 | exit { ... } | |
20032003
| cfg.swift:523:78:531:5 | { ... } | cfg.swift:523:18:531:6 | call to AsyncStream<Element>.init(_:bufferingPolicy:_:) | |
20042004
| cfg.swift:523:78:531:5 | { ... } | cfg.swift:524:9:524:9 | continuation | |
2005-
| cfg.swift:524:9:524:9 | continuation | cfg.swift:525:13:525:18 | .detached(priority:operation:) | |
2006-
| cfg.swift:525:13:525:13 | Task<(), Never>.Type | cfg.swift:525:27:525:27 | default priority | |
2007-
| cfg.swift:525:13:525:18 | .detached(priority:operation:) | cfg.swift:525:13:525:13 | Task<(), Never>.Type | |
2008-
| cfg.swift:525:13:530:13 | call to detached(priority:operation:) | cfg.swift:523:78:531:5 | exit { ... } (normal) | |
2005+
| cfg.swift:524:9:524:9 | continuation | cfg.swift:525:13:525:18 | .detached(name:priority:operation:) | |
2006+
| cfg.swift:525:13:525:13 | Task<(), Never>.Type | cfg.swift:525:27:525:27 | default name | |
2007+
| cfg.swift:525:13:525:18 | .detached(name:priority:operation:) | cfg.swift:525:13:525:13 | Task<(), Never>.Type | |
2008+
| cfg.swift:525:13:530:13 | call to detached(name:priority:operation:) | cfg.swift:523:78:531:5 | exit { ... } (normal) | |
2009+
| cfg.swift:525:27:525:27 | default name | cfg.swift:525:27:525:27 | default priority | |
20092010
| cfg.swift:525:27:525:27 | default priority | cfg.swift:525:27:530:13 | { ... } | |
2010-
| cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | cfg.swift:525:13:530:13 | call to detached(priority:operation:) | |
2011+
| cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | cfg.swift:525:13:530:13 | call to detached(name:priority:operation:) | |
20112012
| cfg.swift:525:27:530:13 | enter { ... } | cfg.swift:525:27:530:13 | { ... } | |
20122013
| cfg.swift:525:27:530:13 | exit { ... } (normal) | cfg.swift:525:27:530:13 | exit { ... } | |
20132014
| cfg.swift:525:27:530:13 | { ... } | cfg.swift:525:27:530:13 | (@isolated(any) () async -> ()) ... | |
@@ -2020,10 +2021,10 @@
20202021
| cfg.swift:526:17:528:17 | for ... in ... { ... } | cfg.swift:529:17:529:30 | .finish() | empty |
20212022
| cfg.swift:526:21:526:21 | i | cfg.swift:527:21:527:34 | .yield(_:) | match |
20222023
| cfg.swift:526:26:526:26 | 1 | cfg.swift:526:30:526:30 | 100 | |
2023-
| cfg.swift:526:26:526:26 | $i$generator | cfg.swift:526:26:526:30 | .makeIterator() | match |
2024-
| cfg.swift:526:26:526:30 | ... ....(_:_:) ... | cfg.swift:526:26:526:30 | call to makeIterator() | |
2025-
| cfg.swift:526:26:526:30 | .makeIterator() | cfg.swift:526:27:526:27 | ....(_:_:) | |
2026-
| cfg.swift:526:26:526:30 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
2024+
| cfg.swift:526:26:526:26 | $i$generator | cfg.swift:526:26:526:26 | .makeIterator() | match |
2025+
| cfg.swift:526:26:526:26 | .makeIterator() | cfg.swift:526:27:526:27 | ....(_:_:) | |
2026+
| cfg.swift:526:26:526:26 | call to makeIterator() | file://:0:0:0:0 | var ... = ... | |
2027+
| cfg.swift:526:26:526:30 | ... ....(_:_:) ... | cfg.swift:526:26:526:26 | call to makeIterator() | |
20272028
| cfg.swift:526:27:526:27 | ....(_:_:) | cfg.swift:526:27:526:27 | Int.Type | |
20282029
| cfg.swift:526:27:526:27 | Int.Type | cfg.swift:526:26:526:26 | 1 | |
20292030
| cfg.swift:526:30:526:30 | 100 | cfg.swift:526:26:526:30 | ... ....(_:_:) ... | |

swift/ql/test/library-tests/dataflow/dataflow/DataFlow.expected

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ edges
150150
| test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | test2.swift:84:14:84:14 | v | provenance | |
151151
| test2.swift:84:14:84:14 | v | test2.swift:86:19:86:19 | v | provenance | |
152152
| test2.swift:84:20:84:20 | a1 [Collection element] | test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | provenance | |
153-
| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
154-
| test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
153+
| test2.swift:84:20:84:20 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:84:5:84:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
154+
| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:84:20:84:20 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
155155
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:95:14:95:14 | a2 [Collection element] | provenance | |
156156
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:99:19:99:19 | a2 [Collection element] | provenance | |
157157
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | test2.swift:101:20:101:20 | a2 [Collection element] | provenance | |
@@ -167,8 +167,8 @@ edges
167167
| test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | test2.swift:101:14:101:14 | v | provenance | |
168168
| test2.swift:101:14:101:14 | v | test2.swift:103:19:103:19 | v | provenance | |
169169
| test2.swift:101:20:101:20 | a2 [Collection element] | test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | provenance | |
170-
| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
171-
| test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
170+
| test2.swift:101:20:101:20 | call to makeIterator() [Collection element, Tuple element at index 1] | test2.swift:101:5:101:5 | $generator [Collection element, Tuple element at index 1] | provenance | |
171+
| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | test2.swift:101:20:101:20 | call to makeIterator() [Collection element, Tuple element at index 1] | provenance | |
172172
| test.swift:6:19:6:26 | call to source() | test.swift:7:15:7:15 | t1 | provenance | |
173173
| test.swift:6:19:6:26 | call to source() | test.swift:9:15:9:15 | t1 | provenance | |
174174
| test.swift:6:19:6:26 | call to source() | test.swift:10:15:10:15 | t2 | provenance | |
@@ -940,8 +940,8 @@ nodes
940940
| test2.swift:84:9:84:15 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] |
941941
| test2.swift:84:14:84:14 | v | semmle.label | v |
942942
| test2.swift:84:20:84:20 | a1 [Collection element] | semmle.label | a1 [Collection element] |
943+
| test2.swift:84:20:84:20 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
943944
| test2.swift:84:20:84:34 | call to enumerated() [Collection element, Tuple element at index 1] | semmle.label | call to enumerated() [Collection element, Tuple element at index 1] |
944-
| test2.swift:84:20:84:34 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
945945
| test2.swift:86:19:86:19 | v | semmle.label | v |
946946
| test2.swift:93:5:93:5 | [post] a2 [Collection element] | semmle.label | [post] a2 [Collection element] |
947947
| test2.swift:93:13:93:29 | call to source(_:) | semmle.label | call to source(_:) |
@@ -958,8 +958,8 @@ nodes
958958
| test2.swift:101:9:101:15 | (...) [Tuple element at index 1] | semmle.label | (...) [Tuple element at index 1] |
959959
| test2.swift:101:14:101:14 | v | semmle.label | v |
960960
| test2.swift:101:20:101:20 | a2 [Collection element] | semmle.label | a2 [Collection element] |
961+
| test2.swift:101:20:101:20 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
961962
| test2.swift:101:20:101:34 | call to enumerated() [Collection element, Tuple element at index 1] | semmle.label | call to enumerated() [Collection element, Tuple element at index 1] |
962-
| test2.swift:101:20:101:34 | call to makeIterator() [Collection element, Tuple element at index 1] | semmle.label | call to makeIterator() [Collection element, Tuple element at index 1] |
963963
| test2.swift:103:19:103:19 | v | semmle.label | v |
964964
| test.swift:6:19:6:26 | call to source() | semmle.label | call to source() |
965965
| test.swift:7:15:7:15 | t1 | semmle.label | t1 |

0 commit comments

Comments
 (0)