Skip to content

Commit a60afef

Browse files
committed
C++: Add a local flow test file for IR dataflow.
1 parent 0ebe045 commit a60afef

File tree

2 files changed

+168
-0
lines changed

2 files changed

+168
-0
lines changed
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
| example.c:15:37:15:37 | **b | example.c:15:37:15:37 | **b |
2+
| example.c:15:37:15:37 | **b | example.c:15:37:15:37 | **b |
3+
| example.c:15:37:15:37 | **b | example.c:15:37:15:37 | *b |
4+
| example.c:15:37:15:37 | **b | example.c:19:6:19:6 | *b |
5+
| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | **b |
6+
| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | *b |
7+
| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | *b |
8+
| example.c:15:37:15:37 | *b | example.c:15:37:15:37 | b |
9+
| example.c:15:37:15:37 | *b | example.c:19:6:19:6 | b |
10+
| example.c:15:37:15:37 | b | example.c:15:37:15:37 | *b |
11+
| example.c:15:37:15:37 | b | example.c:15:37:15:37 | b |
12+
| example.c:15:37:15:37 | b | example.c:15:37:15:37 | b |
13+
| example.c:15:44:15:46 | pos | example.c:24:24:24:26 | pos |
14+
| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords |
15+
| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords |
16+
| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords |
17+
| example.c:17:11:17:16 | *definition of coords | example.c:17:11:17:16 | *definition of coords |
18+
| example.c:17:11:17:16 | *definition of coords | example.c:24:13:24:18 | *coords |
19+
| example.c:17:11:17:16 | *definition of coords [post update] | example.c:17:11:17:16 | *definition of coords |
20+
| example.c:17:11:17:16 | *definition of coords [post update] | example.c:24:13:24:18 | *coords |
21+
| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | *definition of coords |
22+
| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords |
23+
| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords |
24+
| example.c:17:11:17:16 | definition of coords | example.c:17:11:17:16 | definition of coords |
25+
| example.c:17:19:17:22 | {...} | example.c:17:19:17:22 | {...} |
26+
| example.c:17:21:17:21 | 0 | example.c:17:21:17:21 | 0 |
27+
| example.c:19:6:19:6 | *b | example.c:15:37:15:37 | *b |
28+
| example.c:19:6:19:6 | *b [post update] | example.c:15:37:15:37 | *b |
29+
| example.c:19:6:19:6 | *b [post update] | example.c:19:6:19:6 | *b |
30+
| example.c:19:6:19:6 | b [post update] | example.c:19:6:19:6 | b |
31+
| example.c:24:2:24:7 | *coords | example.c:26:18:26:24 | *& ... |
32+
| example.c:24:2:24:7 | *coords [post update] | example.c:26:18:26:24 | *& ... |
33+
| example.c:24:13:24:18 | *coords | example.c:24:2:24:7 | *coords |
34+
| example.c:24:13:24:18 | *coords [post update] | example.c:24:2:24:7 | *coords |
35+
| example.c:24:13:24:30 | ... = ... | example.c:24:2:24:30 | ... = ... |
36+
| example.c:24:20:24:20 | *y | example.c:24:20:24:20 | *y |
37+
| example.c:24:20:24:20 | y | example.c:24:20:24:20 | y |
38+
| example.c:24:20:24:20 | y | example.c:24:20:24:20 | y |
39+
| example.c:24:24:24:26 | pos | example.c:28:14:28:25 | *& ... |
40+
| example.c:24:24:24:30 | ... + ... | example.c:24:13:24:30 | ... = ... |
41+
| example.c:26:13:26:16 | call to getX | example.c:26:2:26:25 | ... = ... |
42+
| example.c:26:18:26:24 | *& ... | example.c:26:2:26:7 | *coords |
43+
| example.c:26:18:26:24 | getX output argument | example.c:26:2:26:7 | *coords |
44+
| example.c:26:19:26:24 | *coords | example.c:26:18:26:24 | *& ... |
45+
| example.c:26:19:26:24 | coords | example.c:26:18:26:24 | & ... |
46+
| example.c:28:22:28:25 | & ... | example.c:28:14:28:25 | & ... |
47+
| example.c:28:22:28:25 | *& ... | example.c:28:14:28:25 | *& ... |
48+
| example.c:28:23:28:25 | *pos | example.c:28:22:28:25 | *& ... |
49+
| example.c:28:23:28:25 | pos | example.c:28:22:28:25 | & ... |
50+
| test.cpp:6:12:6:17 | call to source | test.cpp:6:12:6:17 | call to source |
51+
| test.cpp:6:12:6:17 | call to source | test.cpp:7:8:7:9 | t1 |
52+
| test.cpp:7:8:7:9 | t1 | test.cpp:8:8:8:9 | t1 |
53+
| test.cpp:8:3:8:9 | ... = ... | test.cpp:10:8:10:9 | t2 |
54+
| test.cpp:8:8:8:9 | t1 | test.cpp:8:3:8:9 | ... = ... |
55+
| test.cpp:8:8:8:9 | t1 | test.cpp:9:8:9:9 | t1 |
56+
| test.cpp:9:8:9:9 | t1 | test.cpp:11:7:11:8 | t1 |
57+
| test.cpp:10:8:10:9 | t2 | test.cpp:15:3:15:6 | Phi |
58+
| test.cpp:12:5:12:10 | ... = ... | test.cpp:13:10:13:11 | t2 |
59+
| test.cpp:12:10:12:10 | 0 | test.cpp:12:5:12:10 | ... = ... |
60+
| test.cpp:13:10:13:11 | t2 | test.cpp:15:3:15:6 | Phi |
61+
| test.cpp:15:3:15:6 | Phi | test.cpp:15:8:15:9 | t2 |
62+
| test.cpp:15:3:15:6 | Phi | test.cpp:15:8:15:9 | t2 |
63+
| test.cpp:15:8:15:9 | t2 | test.cpp:23:19:23:19 | Phi |
64+
| test.cpp:15:8:15:9 | t2 | test.cpp:23:19:23:19 | Phi |
65+
| test.cpp:17:3:17:8 | ... = ... | test.cpp:21:8:21:9 | t1 |
66+
| test.cpp:17:8:17:8 | 0 | test.cpp:17:3:17:8 | ... = ... |
67+
| test.cpp:21:8:21:9 | t1 | test.cpp:23:19:23:19 | Phi |
68+
| test.cpp:23:15:23:16 | 0 | test.cpp:23:15:23:16 | 0 |
69+
| test.cpp:23:15:23:16 | 0 | test.cpp:23:19:23:19 | Phi |
70+
| test.cpp:23:19:23:19 | Phi | test.cpp:23:19:23:19 | i |
71+
| test.cpp:23:19:23:19 | Phi | test.cpp:23:19:23:19 | i |
72+
| test.cpp:23:19:23:19 | Phi | test.cpp:23:23:23:24 | t1 |
73+
| test.cpp:23:19:23:19 | Phi | test.cpp:23:23:23:24 | t1 |
74+
| test.cpp:23:19:23:19 | Phi | test.cpp:24:10:24:11 | t2 |
75+
| test.cpp:23:19:23:19 | Phi | test.cpp:24:10:24:11 | t2 |
76+
| test.cpp:23:19:23:19 | i | test.cpp:23:27:23:27 | i |
77+
| test.cpp:23:19:23:19 | i | test.cpp:23:27:23:27 | i |
78+
| test.cpp:23:23:23:24 | t1 | test.cpp:23:19:23:19 | Phi |
79+
| test.cpp:23:23:23:24 | t1 | test.cpp:26:8:26:9 | t1 |
80+
| test.cpp:23:23:23:24 | t1 | test.cpp:26:8:26:9 | t1 |
81+
| test.cpp:23:27:23:27 | *i | test.cpp:23:27:23:27 | *i |
82+
| test.cpp:23:27:23:27 | *i | test.cpp:23:27:23:27 | i |
83+
| test.cpp:23:27:23:27 | i | test.cpp:23:19:23:19 | Phi |
84+
| test.cpp:23:27:23:27 | i | test.cpp:23:27:23:27 | i |
85+
| test.cpp:23:27:23:27 | i | test.cpp:23:27:23:27 | i |
86+
| test.cpp:23:27:23:29 | ... ++ | test.cpp:23:19:23:19 | Phi |
87+
| test.cpp:23:27:23:29 | ... ++ | test.cpp:23:27:23:29 | ... ++ |
88+
| test.cpp:24:5:24:11 | ... = ... | test.cpp:23:19:23:19 | Phi |
89+
| test.cpp:24:10:24:11 | t2 | test.cpp:23:19:23:19 | Phi |
90+
| test.cpp:24:10:24:11 | t2 | test.cpp:23:19:23:19 | Phi |
91+
| test.cpp:24:10:24:11 | t2 | test.cpp:24:5:24:11 | ... = ... |
92+
| test.cpp:382:48:382:54 | source1 | test.cpp:384:16:384:23 | *& ... |
93+
| test.cpp:383:12:383:13 | 0 | test.cpp:383:12:383:13 | 0 |
94+
| test.cpp:383:12:383:13 | 0 | test.cpp:384:10:384:13 | *& ... |
95+
| test.cpp:384:10:384:13 | & ... | test.cpp:384:3:384:8 | call to memcpy |
96+
| test.cpp:384:10:384:13 | & ... | test.cpp:384:10:384:13 | & ... |
97+
| test.cpp:384:10:384:13 | *& ... | test.cpp:384:10:384:13 | *& ... |
98+
| test.cpp:384:10:384:13 | memcpy output argument | test.cpp:385:8:385:10 | tmp |
99+
| test.cpp:384:11:384:13 | *tmp | test.cpp:384:10:384:13 | *& ... |
100+
| test.cpp:384:11:384:13 | tmp | test.cpp:384:10:384:13 | & ... |
101+
| test.cpp:384:16:384:23 | & ... | test.cpp:384:16:384:23 | & ... |
102+
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:3:384:8 | **call to memcpy |
103+
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:3:384:8 | *call to memcpy |
104+
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:10:384:13 | memcpy output argument |
105+
| test.cpp:384:16:384:23 | *& ... | test.cpp:384:16:384:23 | *& ... |
106+
| test.cpp:384:16:384:23 | **(const void *)... | test.cpp:384:3:384:8 | **call to memcpy |
107+
| test.cpp:384:16:384:23 | **(const void *)... | test.cpp:384:10:384:13 | memcpy output argument |
108+
| test.cpp:384:17:384:23 | *source1 | test.cpp:384:16:384:23 | *& ... |
109+
| test.cpp:384:17:384:23 | source1 | test.cpp:384:16:384:23 | & ... |
110+
| test.cpp:388:53:388:59 | source1 | test.cpp:391:16:391:23 | *& ... |
111+
| test.cpp:388:66:388:66 | b | test.cpp:393:7:393:7 | b |
112+
| test.cpp:389:12:389:13 | 0 | test.cpp:389:12:389:13 | 0 |
113+
| test.cpp:389:12:389:13 | 0 | test.cpp:390:18:390:21 | *& ... |
114+
| test.cpp:390:18:390:21 | & ... | test.cpp:390:18:390:21 | & ... |
115+
| test.cpp:390:18:390:21 | *& ... | test.cpp:390:18:390:21 | *& ... |
116+
| test.cpp:390:18:390:21 | *& ... | test.cpp:391:10:391:13 | *& ... |
117+
| test.cpp:390:19:390:21 | *tmp | test.cpp:390:18:390:21 | *& ... |
118+
| test.cpp:390:19:390:21 | tmp | test.cpp:390:18:390:21 | & ... |
119+
| test.cpp:391:10:391:13 | & ... | test.cpp:391:3:391:8 | call to memcpy |
120+
| test.cpp:391:10:391:13 | & ... | test.cpp:391:10:391:13 | & ... |
121+
| test.cpp:391:10:391:13 | *& ... | test.cpp:391:10:391:13 | *& ... |
122+
| test.cpp:391:10:391:13 | memcpy output argument | test.cpp:392:8:392:10 | tmp |
123+
| test.cpp:391:11:391:13 | *tmp | test.cpp:391:10:391:13 | *& ... |
124+
| test.cpp:391:11:391:13 | tmp | test.cpp:391:10:391:13 | & ... |
125+
| test.cpp:391:16:391:23 | & ... | test.cpp:391:16:391:23 | & ... |
126+
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:3:391:8 | **call to memcpy |
127+
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:3:391:8 | *call to memcpy |
128+
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:10:391:13 | memcpy output argument |
129+
| test.cpp:391:16:391:23 | *& ... | test.cpp:391:16:391:23 | *& ... |
130+
| test.cpp:391:16:391:23 | **(const void *)... | test.cpp:391:3:391:8 | **call to memcpy |
131+
| test.cpp:391:16:391:23 | **(const void *)... | test.cpp:391:10:391:13 | memcpy output argument |
132+
| test.cpp:391:17:391:23 | *source1 | test.cpp:391:16:391:23 | *& ... |
133+
| test.cpp:391:17:391:23 | source1 | test.cpp:391:16:391:23 | & ... |
134+
| test.cpp:392:8:392:10 | tmp | test.cpp:394:10:394:12 | tmp |
135+
| test.cpp:487:67:487:67 | **s | test.cpp:487:67:487:67 | **s |
136+
| test.cpp:487:67:487:67 | **s | test.cpp:487:67:487:67 | **s |
137+
| test.cpp:487:67:487:67 | **s | test.cpp:487:67:487:67 | *s |
138+
| test.cpp:487:67:487:67 | **s | test.cpp:488:21:488:21 | *s |
139+
| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | **s |
140+
| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | *s |
141+
| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | *s |
142+
| test.cpp:487:67:487:67 | *s | test.cpp:487:67:487:67 | s |
143+
| test.cpp:487:67:487:67 | *s | test.cpp:488:21:488:21 | s |
144+
| test.cpp:487:67:487:67 | s | test.cpp:487:67:487:67 | *s |
145+
| test.cpp:487:67:487:67 | s | test.cpp:487:67:487:67 | s |
146+
| test.cpp:487:67:487:67 | s | test.cpp:487:67:487:67 | s |
147+
| test.cpp:488:21:488:21 | *s | test.cpp:489:20:489:20 | *s |
148+
| test.cpp:488:21:488:21 | *s [post update] | test.cpp:489:20:489:20 | *s |
149+
| test.cpp:488:21:488:21 | s | test.cpp:489:20:489:20 | s |
150+
| test.cpp:488:21:488:21 | s [post update] | test.cpp:489:20:489:20 | s |
151+
| test.cpp:488:24:488:30 | *content | test.cpp:488:21:488:30 | *content |
152+
| test.cpp:488:24:488:30 | content | test.cpp:488:21:488:30 | content |
153+
| test.cpp:489:20:489:20 | *s | test.cpp:487:67:487:67 | *s |
154+
| test.cpp:489:20:489:20 | *s [post update] | test.cpp:487:67:487:67 | *s |
155+
| test.cpp:489:20:489:20 | *s [post update] | test.cpp:489:20:489:20 | *s |
156+
| test.cpp:489:20:489:20 | s [post update] | test.cpp:489:20:489:20 | s |
157+
| test.cpp:489:23:489:29 | *content | test.cpp:489:23:489:29 | *content |
158+
| test.cpp:489:23:489:29 | *content | test.cpp:490:8:490:17 | * ... |
159+
| test.cpp:489:23:489:29 | content | test.cpp:489:23:489:29 | content |
160+
| test.cpp:489:23:489:29 | content | test.cpp:490:9:490:17 | p_content |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import cpp
2+
import semmle.code.cpp.dataflow.new.DataFlow
3+
4+
from DataFlow::Node nodeFrom, DataFlow::Node nodeTo
5+
where
6+
DataFlow::localFlowStep(nodeFrom, nodeTo) and
7+
nodeFrom.getFunction().getName().matches("%\\_with\\_local\\_flow")
8+
select nodeFrom, nodeTo

0 commit comments

Comments
 (0)