Skip to content

Commit 8d4830c

Browse files
authored
Swift: make dataflow test a path-problem
1 parent a7663ad commit 8d4830c

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ subpaths
6969
| test.swift:75:21:75:22 | &... : | test.swift:65:16:65:28 | arg1 : | test.swift:69:5:69:5 | arg1[return] : | test.swift:75:5:75:33 | arg1 : |
7070
| test.swift:75:21:75:22 | &... : | test.swift:65:16:65:28 | arg1 : | test.swift:69:5:69:5 | arg2[return] : | test.swift:75:5:75:33 | arg2 : |
7171
#select
72-
| test.swift:6:19:6:26 | call to source : | test.swift:7:15:7:15 | t1 |
73-
| test.swift:6:19:6:26 | call to source : | test.swift:9:15:9:15 | t1 |
74-
| test.swift:6:19:6:26 | call to source : | test.swift:10:15:10:15 | t2 |
75-
| test.swift:25:20:25:27 | call to source : | test.swift:30:15:30:15 | x |
76-
| test.swift:26:26:26:33 | call to source : | test.swift:31:15:31:15 | y |
77-
| test.swift:35:12:35:19 | call to source : | test.swift:39:15:39:29 | call to callee_source |
78-
| test.swift:43:19:43:26 | call to source : | test.swift:50:15:50:15 | t |
79-
| test.swift:54:11:54:18 | call to source : | test.swift:62:15:62:15 | x |
80-
| test.swift:73:18:73:25 | call to source : | test.swift:76:15:76:15 | x |
81-
| test.swift:73:18:73:25 | call to source : | test.swift:77:15:77:15 | y |
72+
| test.swift:7:15:7:15 | t1 | test.swift:6:19:6:26 | call to source : | test.swift:7:15:7:15 | t1 | result |
73+
| test.swift:9:15:9:15 | t1 | test.swift:6:19:6:26 | call to source : | test.swift:9:15:9:15 | t1 | result |
74+
| test.swift:10:15:10:15 | t2 | test.swift:6:19:6:26 | call to source : | test.swift:10:15:10:15 | t2 | result |
75+
| test.swift:30:15:30:15 | x | test.swift:25:20:25:27 | call to source : | test.swift:30:15:30:15 | x | result |
76+
| test.swift:31:15:31:15 | y | test.swift:26:26:26:33 | call to source : | test.swift:31:15:31:15 | y | result |
77+
| test.swift:39:15:39:29 | call to callee_source | test.swift:35:12:35:19 | call to source : | test.swift:39:15:39:29 | call to callee_source | result |
78+
| test.swift:50:15:50:15 | t | test.swift:43:19:43:26 | call to source : | test.swift:50:15:50:15 | t | result |
79+
| test.swift:62:15:62:15 | x | test.swift:54:11:54:18 | call to source : | test.swift:62:15:62:15 | x | result |
80+
| test.swift:76:15:76:15 | x | test.swift:73:18:73:25 | call to source : | test.swift:76:15:76:15 | x | result |
81+
| test.swift:77:15:77:15 | y | test.swift:73:18:73:25 | call to source : | test.swift:77:15:77:15 | y | result |

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* @kind path-problem
3+
*/
14
import swift
25
import codeql.swift.dataflow.DataFlow
36
import DataFlow::PathGraph
@@ -21,4 +24,4 @@ class TestConfiguration extends DataFlow::Configuration {
2124

2225
from DataFlow::PathNode src, DataFlow::PathNode sink, TestConfiguration test
2326
where test.hasFlowPath(src, sink)
24-
select src, sink
27+
select sink, src, sink, "result"

0 commit comments

Comments
 (0)