Skip to content

Commit 8ebaab9

Browse files
committed
unified: Hide generated nodes
1 parent 88c4786 commit 8ebaab9

2 files changed

Lines changed: 9 additions & 24 deletions

File tree

‎unified/ql/lib/codeql/unified/internal/dataflow/DataFlowInstantiation.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ module DataFlowInput implements InputSig<Location> {
235235
//
236236
additional predicate nodeIsVisible(Node node) {
237237
exists(Expr e |
238+
e.fromSource() and
238239
node = TValueNode(e) and
239240
not e instanceof ExprPattern
240241
)

‎unified/ql/test/library-tests/dataflow/test.expected‎

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ edges
33
| accessors_instance.swift:8:25:8:38 | source(...) | accessors_instance.swift:10:10:10:14 | ... .x | provenance | |
44
| accessors_instance.swift:18:19:18:32 | source(...) | accessors_instance.swift:21:10:21:14 | ... .x | provenance | |
55
| accessors_instance.swift:27:19:27:32 | source(...) | accessors_instance.swift:31:10:31:14 | ... .x | provenance | |
6-
| accessors_instance.swift:38:13:38:15 | newValue | accessors_instance.swift:38:24:38:31 | newValue | provenance | |
7-
| accessors_instance.swift:41:5:41:9 | ... .x | accessors_instance.swift:38:13:38:15 | newValue | provenance | |
6+
| accessors_instance.swift:41:5:41:9 | ... .x | accessors_instance.swift:38:24:38:31 | newValue | provenance | |
87
| accessors_instance.swift:41:13:41:26 | source(...) | accessors_instance.swift:41:5:41:9 | ... .x | provenance | |
98
| accessors_instance.swift:48:17:48:17 | v | accessors_instance.swift:48:27:48:27 | v | provenance | |
109
| accessors_instance.swift:51:5:51:9 | ... .x | accessors_instance.swift:48:17:48:17 | v | provenance | |
1110
| accessors_instance.swift:51:13:51:27 | source(...) | accessors_instance.swift:51:5:51:9 | ... .x | provenance | |
1211
| accessors_instance.swift:57:19:57:32 | source(...) | accessors_instance.swift:62:11:62:13 | ... .x | provenance | |
13-
| accessors_instance.swift:58:13:58:15 | newValue | accessors_instance.swift:58:24:58:31 | newValue | provenance | |
14-
| accessors_instance.swift:62:5:62:7 | ... .x | accessors_instance.swift:58:13:58:15 | newValue | provenance | |
12+
| accessors_instance.swift:62:5:62:7 | ... .x | accessors_instance.swift:58:24:58:31 | newValue | provenance | |
1513
| accessors_instance.swift:62:11:62:13 | ... .x | accessors_instance.swift:62:5:62:7 | ... .x | provenance | |
1614
| accessors_instance.swift:67:25:67:38 | source(...) | accessors_instance.swift:70:18:70:23 | ... .x | provenance | |
1715
| accessors_instance.swift:67:25:67:38 | source(...) | accessors_instance.swift:71:18:71:18 | x | provenance | |
@@ -33,20 +31,17 @@ edges
3331
| accessors_instance.swift:112:10:112:10 | c [field] | accessors_instance.swift:112:10:112:16 | ... .field | provenance | |
3432
| accessors_instance.swift:119:13:119:17 | field | accessors_instance.swift:125:18:125:22 | field | provenance | |
3533
| accessors_instance.swift:119:21:119:35 | source(...) | accessors_instance.swift:119:13:119:17 | field | provenance | |
36-
| accessors_instance.swift:134:13:134:15 | newValue [0] | accessors_instance.swift:134:24:134:31 | newValue [0] | provenance | |
3734
| accessors_instance.swift:134:24:134:31 | newValue [0] | accessors_instance.swift:134:24:134:33 | ... .0 | provenance | |
38-
| accessors_instance.swift:138:5:138:7 | [post] ... .p [0] | accessors_instance.swift:134:13:134:15 | newValue [0] | provenance | |
35+
| accessors_instance.swift:138:5:138:7 | [post] ... .p [0] | accessors_instance.swift:134:24:134:31 | newValue [0] | provenance | |
3936
| accessors_instance.swift:138:5:138:9 | ... .0 | accessors_instance.swift:138:5:138:7 | [post] ... .p [0] | provenance | |
4037
| accessors_instance.swift:138:13:138:27 | source(...) | accessors_instance.swift:138:5:138:9 | ... .0 | provenance | |
4138
| accessors_local.swift:7:21:7:34 | source(...) | accessors_local.swift:8:10:8:10 | x | provenance | |
4239
| accessors_local.swift:15:15:15:28 | source(...) | accessors_local.swift:17:10:17:10 | x | provenance | |
4340
| accessors_local.swift:22:15:22:28 | source(...) | accessors_local.swift:25:10:25:10 | x | provenance | |
44-
| accessors_local.swift:31:9:31:11 | newValue | accessors_local.swift:31:20:31:27 | newValue | provenance | |
45-
| accessors_local.swift:33:5:33:5 | x | accessors_local.swift:31:9:31:11 | newValue | provenance | |
41+
| accessors_local.swift:33:5:33:5 | x | accessors_local.swift:31:20:31:27 | newValue | provenance | |
4642
| accessors_local.swift:33:9:33:22 | source(...) | accessors_local.swift:33:5:33:5 | x | provenance | |
4743
| accessors_local.swift:38:15:38:28 | source(...) | accessors_local.swift:41:9:41:9 | x | provenance | |
48-
| accessors_local.swift:39:9:39:11 | newValue | accessors_local.swift:39:20:39:27 | newValue | provenance | |
49-
| accessors_local.swift:41:5:41:5 | x | accessors_local.swift:39:9:39:11 | newValue | provenance | |
44+
| accessors_local.swift:41:5:41:5 | x | accessors_local.swift:39:20:39:27 | newValue | provenance | |
5045
| accessors_local.swift:41:9:41:9 | x | accessors_local.swift:41:5:41:5 | x | provenance | |
5146
| accessors_local.swift:45:9:45:9 | y | accessors_local.swift:46:21:46:21 | y | provenance | |
5247
| accessors_local.swift:45:9:45:9 | y | accessors_local.swift:47:10:47:10 | x | provenance | |
@@ -59,20 +54,17 @@ edges
5954
| accessors_local.swift:72:9:72:22 | source(...) | accessors_local.swift:72:5:72:5 | y | provenance | |
6055
| accessors_local.swift:84:5:84:5 | y | accessors_local.swift:82:14:82:15 | x3 | provenance | |
6156
| accessors_local.swift:84:9:84:22 | source(...) | accessors_local.swift:84:5:84:5 | y | provenance | |
62-
| accessors_local.swift:91:9:91:11 | newValue [0] | accessors_local.swift:91:20:91:27 | newValue [0] | provenance | |
6357
| accessors_local.swift:91:20:91:27 | newValue [0] | accessors_local.swift:91:20:91:29 | ... .0 | provenance | |
64-
| accessors_local.swift:93:5:93:5 | [post] p [0] | accessors_local.swift:91:9:91:11 | newValue [0] | provenance | |
58+
| accessors_local.swift:93:5:93:5 | [post] p [0] | accessors_local.swift:91:20:91:27 | newValue [0] | provenance | |
6559
| accessors_local.swift:93:5:93:7 | ... .0 | accessors_local.swift:93:5:93:5 | [post] p [0] | provenance | |
6660
| accessors_local.swift:93:11:93:25 | source(...) | accessors_local.swift:93:5:93:7 | ... .0 | provenance | |
6761
| accessors_static.swift:8:32:8:45 | source(...) | accessors_static.swift:10:10:10:12 | ... .x | provenance | |
6862
| accessors_static.swift:18:19:18:32 | source(...) | accessors_static.swift:21:10:21:12 | ... .x | provenance | |
6963
| accessors_static.swift:27:19:27:32 | source(...) | accessors_static.swift:31:10:31:12 | ... .x | provenance | |
70-
| accessors_static.swift:38:13:38:15 | newValue | accessors_static.swift:38:24:38:31 | newValue | provenance | |
71-
| accessors_static.swift:41:5:41:7 | ... .x | accessors_static.swift:38:13:38:15 | newValue | provenance | |
64+
| accessors_static.swift:41:5:41:7 | ... .x | accessors_static.swift:38:24:38:31 | newValue | provenance | |
7265
| accessors_static.swift:41:11:41:24 | source(...) | accessors_static.swift:41:5:41:7 | ... .x | provenance | |
7366
| accessors_static.swift:47:19:47:32 | source(...) | accessors_static.swift:51:11:51:13 | ... .x | provenance | |
74-
| accessors_static.swift:48:13:48:15 | newValue | accessors_static.swift:48:24:48:31 | newValue | provenance | |
75-
| accessors_static.swift:51:5:51:7 | ... .x | accessors_static.swift:48:13:48:15 | newValue | provenance | |
67+
| accessors_static.swift:51:5:51:7 | ... .x | accessors_static.swift:48:24:48:31 | newValue | provenance | |
7668
| accessors_static.swift:51:11:51:13 | ... .x | accessors_static.swift:51:5:51:7 | ... .x | provenance | |
7769
| accessors_static.swift:56:32:56:45 | source(...) | accessors_static.swift:59:18:59:23 | ... .x | provenance | |
7870
| accessors_static.swift:56:32:56:45 | source(...) | accessors_static.swift:63:18:63:23 | ... .x | provenance | |
@@ -528,7 +520,6 @@ nodes
528520
| accessors_instance.swift:21:10:21:14 | ... .x | semmle.label | ... .x |
529521
| accessors_instance.swift:27:19:27:32 | source(...) | semmle.label | source(...) |
530522
| accessors_instance.swift:31:10:31:14 | ... .x | semmle.label | ... .x |
531-
| accessors_instance.swift:38:13:38:15 | newValue | semmle.label | newValue |
532523
| accessors_instance.swift:38:24:38:31 | newValue | semmle.label | newValue |
533524
| accessors_instance.swift:41:5:41:9 | ... .x | semmle.label | ... .x |
534525
| accessors_instance.swift:41:13:41:26 | source(...) | semmle.label | source(...) |
@@ -537,7 +528,6 @@ nodes
537528
| accessors_instance.swift:51:5:51:9 | ... .x | semmle.label | ... .x |
538529
| accessors_instance.swift:51:13:51:27 | source(...) | semmle.label | source(...) |
539530
| accessors_instance.swift:57:19:57:32 | source(...) | semmle.label | source(...) |
540-
| accessors_instance.swift:58:13:58:15 | newValue | semmle.label | newValue |
541531
| accessors_instance.swift:58:24:58:31 | newValue | semmle.label | newValue |
542532
| accessors_instance.swift:62:5:62:7 | ... .x | semmle.label | ... .x |
543533
| accessors_instance.swift:62:11:62:13 | ... .x | semmle.label | ... .x |
@@ -566,7 +556,6 @@ nodes
566556
| accessors_instance.swift:119:13:119:17 | field | semmle.label | field |
567557
| accessors_instance.swift:119:21:119:35 | source(...) | semmle.label | source(...) |
568558
| accessors_instance.swift:125:18:125:22 | field | semmle.label | field |
569-
| accessors_instance.swift:134:13:134:15 | newValue [0] | semmle.label | newValue [0] |
570559
| accessors_instance.swift:134:24:134:31 | newValue [0] | semmle.label | newValue [0] |
571560
| accessors_instance.swift:134:24:134:33 | ... .0 | semmle.label | ... .0 |
572561
| accessors_instance.swift:138:5:138:7 | [post] ... .p [0] | semmle.label | [post] ... .p [0] |
@@ -578,12 +567,10 @@ nodes
578567
| accessors_local.swift:17:10:17:10 | x | semmle.label | x |
579568
| accessors_local.swift:22:15:22:28 | source(...) | semmle.label | source(...) |
580569
| accessors_local.swift:25:10:25:10 | x | semmle.label | x |
581-
| accessors_local.swift:31:9:31:11 | newValue | semmle.label | newValue |
582570
| accessors_local.swift:31:20:31:27 | newValue | semmle.label | newValue |
583571
| accessors_local.swift:33:5:33:5 | x | semmle.label | x |
584572
| accessors_local.swift:33:9:33:22 | source(...) | semmle.label | source(...) |
585573
| accessors_local.swift:38:15:38:28 | source(...) | semmle.label | source(...) |
586-
| accessors_local.swift:39:9:39:11 | newValue | semmle.label | newValue |
587574
| accessors_local.swift:39:20:39:27 | newValue | semmle.label | newValue |
588575
| accessors_local.swift:41:5:41:5 | x | semmle.label | x |
589576
| accessors_local.swift:41:9:41:9 | x | semmle.label | x |
@@ -603,7 +590,6 @@ nodes
603590
| accessors_local.swift:82:14:82:15 | x3 | semmle.label | x3 |
604591
| accessors_local.swift:84:5:84:5 | y | semmle.label | y |
605592
| accessors_local.swift:84:9:84:22 | source(...) | semmle.label | source(...) |
606-
| accessors_local.swift:91:9:91:11 | newValue [0] | semmle.label | newValue [0] |
607593
| accessors_local.swift:91:20:91:27 | newValue [0] | semmle.label | newValue [0] |
608594
| accessors_local.swift:91:20:91:29 | ... .0 | semmle.label | ... .0 |
609595
| accessors_local.swift:93:5:93:5 | [post] p [0] | semmle.label | [post] p [0] |
@@ -615,12 +601,10 @@ nodes
615601
| accessors_static.swift:21:10:21:12 | ... .x | semmle.label | ... .x |
616602
| accessors_static.swift:27:19:27:32 | source(...) | semmle.label | source(...) |
617603
| accessors_static.swift:31:10:31:12 | ... .x | semmle.label | ... .x |
618-
| accessors_static.swift:38:13:38:15 | newValue | semmle.label | newValue |
619604
| accessors_static.swift:38:24:38:31 | newValue | semmle.label | newValue |
620605
| accessors_static.swift:41:5:41:7 | ... .x | semmle.label | ... .x |
621606
| accessors_static.swift:41:11:41:24 | source(...) | semmle.label | source(...) |
622607
| accessors_static.swift:47:19:47:32 | source(...) | semmle.label | source(...) |
623-
| accessors_static.swift:48:13:48:15 | newValue | semmle.label | newValue |
624608
| accessors_static.swift:48:24:48:31 | newValue | semmle.label | newValue |
625609
| accessors_static.swift:51:5:51:7 | ... .x | semmle.label | ... .x |
626610
| accessors_static.swift:51:11:51:13 | ... .x | semmle.label | ... .x |

0 commit comments

Comments
 (0)