Skip to content

Commit 84e70e1

Browse files
committed
Add direct method calls
1 parent fa18fd2 commit 84e70e1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.expected

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
| test.go:22:2:22:2 | definition of a | test.go:24:2:24:2 | a |
44
| test.go:22:2:22:2 | definition of a | test.go:25:2:25:2 | a |
55
| test.go:22:2:22:2 | definition of a | test.go:26:2:26:2 | a |
6+
| test.go:22:2:22:2 | definition of a | test.go:29:6:29:6 | a |
7+
| test.go:22:2:22:2 | definition of a | test.go:30:7:30:7 | a |
68
| test.go:23:11:23:14 | &... | test.go:23:11:23:14 | &... |
79
| test.go:23:12:23:14 | selection of b | test.go:23:12:23:14 | selection of b |
810
| test.go:24:2:24:5 | selection of bs | test.go:24:2:24:5 | selection of bs |
@@ -17,3 +19,6 @@
1719
| test.go:26:2:26:7 | selection of bptr | test.go:26:2:26:7 | selection of bptr |
1820
| test.go:26:2:26:12 | implicit dereference | test.go:26:2:26:12 | implicit dereference |
1921
| test.go:26:2:26:12 | selection of cptr | test.go:26:2:26:12 | selection of cptr |
22+
| test.go:28:2:28:2 | definition of c | test.go:29:2:29:2 | c |
23+
| test.go:28:2:28:2 | definition of c | test.go:30:2:30:2 | c |
24+
| test.go:28:7:28:10 | struct literal | test.go:28:7:28:10 | struct literal |

go/ql/test/library-tests/semmle/go/dataflow/PostUpdateNodes/test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ func f() {
2525
a.bs[3].cptr.field = 100
2626
a.bptr.cptr.field = 101
2727

28+
c := C{0}
29+
c.m(a)
30+
c.mp(a)
31+
2832
}

0 commit comments

Comments
 (0)