Skip to content

Commit 184cb74

Browse files
committed
Swift: Accept test changes.
1 parent f46ea32 commit 184cb74

File tree

3 files changed

+68
-2
lines changed

3 files changed

+68
-2
lines changed

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

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,32 @@ edges
247247
| test.swift:549:24:549:32 | call to source3() : | test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : |
248248
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:535:9:535:9 | self [str] : |
249249
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:550:13:550:43 | .str |
250+
| test.swift:567:8:567:11 | x : | test.swift:568:14:568:14 | x : |
251+
| test.swift:568:5:568:5 | [post] self [x] : | test.swift:567:3:569:3 | self[return] [x] : |
252+
| test.swift:568:14:568:14 | x : | test.swift:568:5:568:5 | [post] self [x] : |
253+
| test.swift:573:11:573:24 | call to S.init(x:) [x] : | test.swift:575:13:575:13 | s [x] : |
254+
| test.swift:573:16:573:23 | call to source() : | test.swift:567:8:567:11 | x : |
255+
| test.swift:573:16:573:23 | call to source() : | test.swift:573:11:573:24 | call to S.init(x:) [x] : |
256+
| test.swift:574:11:574:14 | enter #keyPath(...) [x] : | test.swift:574:14:574:14 | KeyPathComponent [x] : |
257+
| test.swift:574:14:574:14 | KeyPathComponent [x] : | test.swift:574:11:574:14 | exit #keyPath(...) : |
258+
| test.swift:575:13:575:13 | s [x] : | test.swift:574:11:574:14 | enter #keyPath(...) [x] : |
259+
| test.swift:575:13:575:13 | s [x] : | test.swift:575:13:575:25 | \\...[...] |
260+
| test.swift:575:13:575:13 | s [x] : | test.swift:575:13:575:25 | \\...[...] |
261+
| test.swift:581:8:581:11 | s [x] : | test.swift:582:14:582:14 | s [x] : |
262+
| test.swift:582:5:582:5 | [post] self [s, x] : | test.swift:581:3:583:3 | self[return] [s, x] : |
263+
| test.swift:582:14:582:14 | s [x] : | test.swift:582:5:582:5 | [post] self [s, x] : |
264+
| test.swift:587:11:587:24 | call to S.init(x:) [x] : | test.swift:588:18:588:18 | s [x] : |
265+
| test.swift:587:16:587:23 | call to source() : | test.swift:567:8:567:11 | x : |
266+
| test.swift:587:16:587:23 | call to source() : | test.swift:587:11:587:24 | call to S.init(x:) [x] : |
267+
| test.swift:588:12:588:19 | call to S2.init(s:) [s, x] : | test.swift:590:13:590:13 | s2 [s, x] : |
268+
| test.swift:588:18:588:18 | s [x] : | test.swift:581:8:581:11 | s [x] : |
269+
| test.swift:588:18:588:18 | s [x] : | test.swift:588:12:588:19 | call to S2.init(s:) [s, x] : |
270+
| test.swift:589:11:589:17 | enter #keyPath(...) [s, x] : | test.swift:589:15:589:15 | KeyPathComponent [s, x] : |
271+
| test.swift:589:15:589:15 | KeyPathComponent [s, x] : | test.swift:589:17:589:17 | KeyPathComponent [x] : |
272+
| test.swift:589:17:589:17 | KeyPathComponent [x] : | test.swift:589:11:589:17 | exit #keyPath(...) : |
273+
| test.swift:590:13:590:13 | s2 [s, x] : | test.swift:589:11:589:17 | enter #keyPath(...) [s, x] : |
274+
| test.swift:590:13:590:13 | s2 [s, x] : | test.swift:590:13:590:26 | \\...[...] |
275+
| test.swift:590:13:590:13 | s2 [s, x] : | test.swift:590:13:590:26 | \\...[...] |
250276
nodes
251277
| file://:0:0:0:0 | .a [x] : | semmle.label | .a [x] : |
252278
| file://:0:0:0:0 | .str : | semmle.label | .str : |
@@ -514,6 +540,33 @@ nodes
514540
| test.swift:549:24:549:32 | call to source3() : | semmle.label | call to source3() : |
515541
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | semmle.label | call to Self.init(contentsOfFile:) [str] : |
516542
| test.swift:550:13:550:43 | .str | semmle.label | .str |
543+
| test.swift:567:3:569:3 | self[return] [x] : | semmle.label | self[return] [x] : |
544+
| test.swift:567:8:567:11 | x : | semmle.label | x : |
545+
| test.swift:568:5:568:5 | [post] self [x] : | semmle.label | [post] self [x] : |
546+
| test.swift:568:14:568:14 | x : | semmle.label | x : |
547+
| test.swift:573:11:573:24 | call to S.init(x:) [x] : | semmle.label | call to S.init(x:) [x] : |
548+
| test.swift:573:16:573:23 | call to source() : | semmle.label | call to source() : |
549+
| test.swift:574:11:574:14 | enter #keyPath(...) [x] : | semmle.label | enter #keyPath(...) [x] : |
550+
| test.swift:574:11:574:14 | exit #keyPath(...) : | semmle.label | exit #keyPath(...) : |
551+
| test.swift:574:14:574:14 | KeyPathComponent [x] : | semmle.label | KeyPathComponent [x] : |
552+
| test.swift:575:13:575:13 | s [x] : | semmle.label | s [x] : |
553+
| test.swift:575:13:575:25 | \\...[...] | semmle.label | \\...[...] |
554+
| test.swift:575:13:575:25 | \\...[...] | semmle.label | \\...[...] |
555+
| test.swift:581:3:583:3 | self[return] [s, x] : | semmle.label | self[return] [s, x] : |
556+
| test.swift:581:8:581:11 | s [x] : | semmle.label | s [x] : |
557+
| test.swift:582:5:582:5 | [post] self [s, x] : | semmle.label | [post] self [s, x] : |
558+
| test.swift:582:14:582:14 | s [x] : | semmle.label | s [x] : |
559+
| test.swift:587:11:587:24 | call to S.init(x:) [x] : | semmle.label | call to S.init(x:) [x] : |
560+
| test.swift:587:16:587:23 | call to source() : | semmle.label | call to source() : |
561+
| test.swift:588:12:588:19 | call to S2.init(s:) [s, x] : | semmle.label | call to S2.init(s:) [s, x] : |
562+
| test.swift:588:18:588:18 | s [x] : | semmle.label | s [x] : |
563+
| test.swift:589:11:589:17 | enter #keyPath(...) [s, x] : | semmle.label | enter #keyPath(...) [s, x] : |
564+
| test.swift:589:11:589:17 | exit #keyPath(...) : | semmle.label | exit #keyPath(...) : |
565+
| test.swift:589:15:589:15 | KeyPathComponent [s, x] : | semmle.label | KeyPathComponent [s, x] : |
566+
| test.swift:589:17:589:17 | KeyPathComponent [x] : | semmle.label | KeyPathComponent [x] : |
567+
| test.swift:590:13:590:13 | s2 [s, x] : | semmle.label | s2 [s, x] : |
568+
| test.swift:590:13:590:26 | \\...[...] | semmle.label | \\...[...] |
569+
| test.swift:590:13:590:26 | \\...[...] | semmle.label | \\...[...] |
517570
subpaths
518571
| test.swift:75:21:75:22 | &... : | test.swift:65:16:65:28 | arg1 : | test.swift:65:1:70:1 | arg2[return] : | test.swift:75:31:75:32 | [post] &... : |
519572
| test.swift:114:19:114:19 | arg : | test.swift:109:9:109:14 | arg : | test.swift:110:12:110:12 | arg : | test.swift:114:12:114:22 | call to ... : |
@@ -551,6 +604,13 @@ subpaths
551604
| test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : | test.swift:535:9:535:9 | self [str] : | file://:0:0:0:0 | .str : | test.swift:549:13:549:35 | .str |
552605
| test.swift:549:24:549:32 | call to source3() : | test.swift:536:10:536:13 | s : | test.swift:536:5:538:5 | self[return] [str] : | test.swift:549:13:549:33 | call to MyClass.init(s:) [str] : |
553606
| test.swift:550:13:550:41 | call to Self.init(contentsOfFile:) [str] : | test.swift:535:9:535:9 | self [str] : | file://:0:0:0:0 | .str : | test.swift:550:13:550:43 | .str |
607+
| test.swift:573:16:573:23 | call to source() : | test.swift:567:8:567:11 | x : | test.swift:567:3:569:3 | self[return] [x] : | test.swift:573:11:573:24 | call to S.init(x:) [x] : |
608+
| test.swift:575:13:575:13 | s [x] : | test.swift:574:11:574:14 | enter #keyPath(...) [x] : | test.swift:574:11:574:14 | exit #keyPath(...) : | test.swift:575:13:575:25 | \\...[...] |
609+
| test.swift:575:13:575:13 | s [x] : | test.swift:574:11:574:14 | enter #keyPath(...) [x] : | test.swift:574:11:574:14 | exit #keyPath(...) : | test.swift:575:13:575:25 | \\...[...] |
610+
| test.swift:587:16:587:23 | call to source() : | test.swift:567:8:567:11 | x : | test.swift:567:3:569:3 | self[return] [x] : | test.swift:587:11:587:24 | call to S.init(x:) [x] : |
611+
| test.swift:588:18:588:18 | s [x] : | test.swift:581:8:581:11 | s [x] : | test.swift:581:3:583:3 | self[return] [s, x] : | test.swift:588:12:588:19 | call to S2.init(s:) [s, x] : |
612+
| test.swift:590:13:590:13 | s2 [s, x] : | test.swift:589:11:589:17 | enter #keyPath(...) [s, x] : | test.swift:589:11:589:17 | exit #keyPath(...) : | test.swift:590:13:590:26 | \\...[...] |
613+
| test.swift:590:13:590:13 | s2 [s, x] : | test.swift:589:11:589:17 | enter #keyPath(...) [s, x] : | test.swift:589:11:589:17 | exit #keyPath(...) : | test.swift:590:13:590:26 | \\...[...] |
554614
#select
555615
| test.swift:7:15:7:15 | t1 | test.swift:6:19:6:26 | call to source() : | test.swift:7:15:7:15 | t1 | result |
556616
| test.swift:9:15:9:15 | t1 | test.swift:6:19:6:26 | call to source() : | test.swift:9:15:9:15 | t1 | result |
@@ -621,3 +681,7 @@ subpaths
621681
| test.swift:544:17:544:17 | .str | test.swift:543:20:543:28 | call to source3() : | test.swift:544:17:544:17 | .str | result |
622682
| test.swift:549:13:549:35 | .str | test.swift:549:24:549:32 | call to source3() : | test.swift:549:13:549:35 | .str | result |
623683
| test.swift:550:13:550:43 | .str | test.swift:543:20:543:28 | call to source3() : | test.swift:550:13:550:43 | .str | result |
684+
| test.swift:575:13:575:25 | \\...[...] | test.swift:573:16:573:23 | call to source() : | test.swift:575:13:575:25 | \\...[...] | result |
685+
| test.swift:575:13:575:25 | \\...[...] | test.swift:573:16:573:23 | call to source() : | test.swift:575:13:575:25 | \\...[...] | result |
686+
| test.swift:590:13:590:26 | \\...[...] | test.swift:587:16:587:23 | call to source() : | test.swift:590:13:590:26 | \\...[...] | result |
687+
| test.swift:590:13:590:26 | \\...[...] | test.swift:587:16:587:23 | call to source() : | test.swift:590:13:590:26 | \\...[...] | result |

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@
615615
| test.swift:574:7:574:7 | f | test.swift:574:7:574:7 | SSA def(f) |
616616
| test.swift:574:11:574:14 | #keyPath(...) | test.swift:574:7:574:7 | f |
617617
| test.swift:574:11:574:14 | #keyPath(...) | test.swift:574:7:574:7 | f |
618+
| test.swift:574:11:574:14 | enter #keyPath(...) | test.swift:574:14:574:14 | KeyPathComponent |
618619
| test.swift:579:7:579:7 | self | test.swift:579:7:579:7 | SSA def(self) |
619620
| test.swift:581:3:581:3 | SSA def(self) | test.swift:582:5:582:5 | self |
620621
| test.swift:581:3:581:3 | self | test.swift:581:3:581:3 | SSA def(self) |
@@ -632,3 +633,4 @@
632633
| test.swift:589:7:589:7 | f | test.swift:589:7:589:7 | SSA def(f) |
633634
| test.swift:589:11:589:17 | #keyPath(...) | test.swift:589:7:589:7 | f |
634635
| test.swift:589:11:589:17 | #keyPath(...) | test.swift:589:7:589:7 | f |
636+
| test.swift:589:11:589:17 | enter #keyPath(...) | test.swift:589:15:589:15 | KeyPathComponent |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ struct S {
572572
func testKeyPath() {
573573
let s = S(x: source())
574574
let f = \S.x
575-
sink(arg: s[keyPath: f]) // $ MISSING: flow=573
575+
sink(arg: s[keyPath: f]) // $ flow=573
576576
}
577577

578578
struct S2 {
@@ -587,5 +587,5 @@ func testNestedKeyPath() {
587587
let s = S(x: source())
588588
let s2 = S2(s: s)
589589
let f = \S2.s.x
590-
sink(arg: s2[keyPath: f]) // $ MISSING: flow=587
590+
sink(arg: s2[keyPath: f]) // $ flow=587
591591
}

0 commit comments

Comments
 (0)