Skip to content

Commit 85d6b7c

Browse files
committed
C++: Add tests.
1 parent a9d76cb commit 85d6b7c

12 files changed

+2484
-0
lines changed

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected

Lines changed: 261 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import semmle.code.cpp.dataflow.internal.DataFlowImplConsistency::Consistency

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected

Lines changed: 354 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import semmle.code.cpp.ir.dataflow.internal.DataFlowImplConsistency::Consistency
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
uniqueEnclosingCallable
2+
| C.cpp:37:24:37:33 | 0 | Node should have one enclosing callable but has 0. |
3+
| C.cpp:37:24:37:33 | new | Node should have one enclosing callable but has 0. |
4+
uniqueTypeBound
5+
| complex.cpp:22:11:22:17 | constructor init of field f [post-this] | Node should have one type bound but has 0. |
6+
| complex.cpp:22:11:22:17 | constructor init of field f [pre-this] | Node should have one type bound but has 0. |
7+
uniqueTypeRepr
8+
| complex.cpp:22:11:22:17 | constructor init of field f [post-this] | Node should have one type representation but has 0. |
9+
| complex.cpp:22:11:22:17 | constructor init of field f [pre-this] | Node should have one type representation but has 0. |
10+
uniqueNodeLocation
11+
| A.cpp:38:7:38:8 | call to C | Node should have one ___location but has 2. |
12+
| A.cpp:39:7:39:8 | call to C | Node should have one ___location but has 2. |
13+
| A.cpp:41:15:41:21 | call to C | Node should have one ___location but has 2. |
14+
| A.cpp:47:12:47:18 | call to C | Node should have one ___location but has 2. |
15+
| A.cpp:57:17:57:23 | call to C | Node should have one ___location but has 2. |
16+
| A.cpp:64:21:64:28 | call to C2 | Node should have one ___location but has 2. |
17+
| A.cpp:73:25:73:32 | call to C2 | Node should have one ___location but has 2. |
18+
| A.cpp:126:12:126:18 | call to C | Node should have one ___location but has 2. |
19+
| A.cpp:142:14:142:20 | call to C | Node should have one ___location but has 2. |
20+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
21+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
22+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
23+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
24+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
25+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
26+
| file://:0:0:0:0 | call to C | Node should have one ___location but has 2. |
27+
| file://:0:0:0:0 | call to C2 | Node should have one ___location but has 2. |
28+
| file://:0:0:0:0 | call to C2 | Node should have one ___location but has 2. |
29+
missingLocation
30+
uniqueNodeToString
31+
missingToString
32+
parameterCallable
33+
localFlowIsLocal
34+
compatibleTypesReflexive
35+
unreachableNodeCCtx
36+
localCallNodes
37+
postIsNotPre
38+
postHasUniquePre
39+
uniquePostUpdate
40+
postIsInSameCallable
41+
reverseRead
42+
storeIsPostUpdate
43+
argHasPostUpdate
44+
| A.cpp:40:15:40:21 | 0 | ArgumentNode is missing PostUpdateNode. |
45+
| A.cpp:41:15:41:21 | new | ArgumentNode is missing PostUpdateNode. |
46+
| A.cpp:55:12:55:19 | new | ArgumentNode is missing PostUpdateNode. |
47+
| A.cpp:56:13:56:15 | call to get | ArgumentNode is missing PostUpdateNode. |
48+
| A.cpp:57:17:57:23 | new | ArgumentNode is missing PostUpdateNode. |
49+
| A.cpp:57:28:57:30 | call to get | ArgumentNode is missing PostUpdateNode. |
50+
| A.cpp:64:21:64:28 | new | ArgumentNode is missing PostUpdateNode. |
51+
| A.cpp:73:25:73:32 | new | ArgumentNode is missing PostUpdateNode. |
52+
| A.cpp:126:12:126:18 | new | ArgumentNode is missing PostUpdateNode. |
53+
| A.cpp:151:21:151:21 | call to r | ArgumentNode is missing PostUpdateNode. |
54+
| A.cpp:160:32:160:59 | new | ArgumentNode is missing PostUpdateNode. |
55+
| A.cpp:160:43:160:49 | 0 | ArgumentNode is missing PostUpdateNode. |
56+
| A.cpp:160:52:160:58 | 0 | ArgumentNode is missing PostUpdateNode. |
57+
| A.cpp:161:29:161:35 | 0 | ArgumentNode is missing PostUpdateNode. |
58+
| A.cpp:162:29:162:35 | 0 | ArgumentNode is missing PostUpdateNode. |
59+
| B.cpp:7:28:7:34 | 0 | ArgumentNode is missing PostUpdateNode. |
60+
| B.cpp:16:28:16:34 | 0 | ArgumentNode is missing PostUpdateNode. |
61+
| C.cpp:29:10:29:11 | s1 | ArgumentNode is missing PostUpdateNode. |
62+
| C.cpp:30:10:30:11 | s2 | ArgumentNode is missing PostUpdateNode. |
63+
| C.cpp:31:10:31:11 | s3 | ArgumentNode is missing PostUpdateNode. |
64+
| C.cpp:32:10:32:11 | s4 | ArgumentNode is missing PostUpdateNode. |
65+
| D.cpp:22:25:22:31 | call to getElem | ArgumentNode is missing PostUpdateNode. |
66+
| D.cpp:29:24:29:40 | new | ArgumentNode is missing PostUpdateNode. |
67+
| D.cpp:29:33:29:39 | 0 | ArgumentNode is missing PostUpdateNode. |
68+
| D.cpp:36:24:36:40 | new | ArgumentNode is missing PostUpdateNode. |
69+
| D.cpp:36:33:36:39 | 0 | ArgumentNode is missing PostUpdateNode. |
70+
| D.cpp:43:24:43:40 | new | ArgumentNode is missing PostUpdateNode. |
71+
| D.cpp:43:33:43:39 | 0 | ArgumentNode is missing PostUpdateNode. |
72+
| D.cpp:50:24:50:40 | new | ArgumentNode is missing PostUpdateNode. |
73+
| D.cpp:50:33:50:39 | 0 | ArgumentNode is missing PostUpdateNode. |
74+
| D.cpp:57:25:57:41 | new | ArgumentNode is missing PostUpdateNode. |
75+
| D.cpp:57:34:57:40 | 0 | ArgumentNode is missing PostUpdateNode. |
76+
| aliasing.cpp:27:14:27:15 | s3 | ArgumentNode is missing PostUpdateNode. |
77+
| aliasing.cpp:29:11:29:12 | m1 | ArgumentNode is missing PostUpdateNode. |
78+
| aliasing.cpp:30:11:30:12 | m1 | ArgumentNode is missing PostUpdateNode. |
79+
| aliasing.cpp:31:11:31:12 | m1 | ArgumentNode is missing PostUpdateNode. |
80+
| aliasing.cpp:38:11:38:12 | m1 | ArgumentNode is missing PostUpdateNode. |
81+
| aliasing.cpp:43:13:43:14 | m1 | ArgumentNode is missing PostUpdateNode. |
82+
| aliasing.cpp:50:11:50:12 | m1 | ArgumentNode is missing PostUpdateNode. |
83+
| aliasing.cpp:55:14:55:15 | m1 | ArgumentNode is missing PostUpdateNode. |
84+
| aliasing.cpp:62:14:62:15 | m1 | ArgumentNode is missing PostUpdateNode. |
85+
| aliasing.cpp:73:12:73:13 | m1 | ArgumentNode is missing PostUpdateNode. |
86+
| aliasing.cpp:80:12:80:13 | m1 | ArgumentNode is missing PostUpdateNode. |
87+
| aliasing.cpp:87:12:87:13 | m1 | ArgumentNode is missing PostUpdateNode. |
88+
| aliasing.cpp:93:12:93:13 | m1 | ArgumentNode is missing PostUpdateNode. |
89+
| by_reference.cpp:40:12:40:15 | this | ArgumentNode is missing PostUpdateNode. |
90+
| by_reference.cpp:44:26:44:29 | this | ArgumentNode is missing PostUpdateNode. |
91+
| by_reference.cpp:50:17:50:26 | call to user_input | ArgumentNode is missing PostUpdateNode. |
92+
| by_reference.cpp:51:8:51:8 | s | ArgumentNode is missing PostUpdateNode. |
93+
| by_reference.cpp:51:10:51:20 | call to getDirectly | ArgumentNode is missing PostUpdateNode. |
94+
| by_reference.cpp:56:19:56:28 | call to user_input | ArgumentNode is missing PostUpdateNode. |
95+
| by_reference.cpp:57:8:57:8 | s | ArgumentNode is missing PostUpdateNode. |
96+
| by_reference.cpp:57:10:57:22 | call to getIndirectly | ArgumentNode is missing PostUpdateNode. |
97+
| by_reference.cpp:62:25:62:34 | call to user_input | ArgumentNode is missing PostUpdateNode. |
98+
| by_reference.cpp:63:8:63:8 | s | ArgumentNode is missing PostUpdateNode. |
99+
| by_reference.cpp:63:10:63:28 | call to getThroughNonMember | ArgumentNode is missing PostUpdateNode. |
100+
| by_reference.cpp:68:21:68:30 | call to user_input | ArgumentNode is missing PostUpdateNode. |
101+
| by_reference.cpp:69:8:69:20 | call to nonMemberGetA | ArgumentNode is missing PostUpdateNode. |
102+
| by_reference.cpp:69:22:69:23 | & ... | ArgumentNode is missing PostUpdateNode. |
103+
| complex.cpp:22:13:22:13 | 0 | ArgumentNode is missing PostUpdateNode. |
104+
| complex.cpp:22:16:22:16 | 0 | ArgumentNode is missing PostUpdateNode. |
105+
| complex.cpp:44:12:44:12 | call to a | ArgumentNode is missing PostUpdateNode. |
106+
| complex.cpp:45:12:45:12 | call to b | ArgumentNode is missing PostUpdateNode. |
107+
| complex.cpp:55:13:55:22 | call to user_input | ArgumentNode is missing PostUpdateNode. |
108+
| complex.cpp:56:13:56:22 | call to user_input | ArgumentNode is missing PostUpdateNode. |
109+
| complex.cpp:57:13:57:22 | call to user_input | ArgumentNode is missing PostUpdateNode. |
110+
| complex.cpp:58:13:58:22 | call to user_input | ArgumentNode is missing PostUpdateNode. |
111+
| constructors.cpp:28:12:28:12 | call to a | ArgumentNode is missing PostUpdateNode. |
112+
| constructors.cpp:29:12:29:12 | call to b | ArgumentNode is missing PostUpdateNode. |
113+
| constructors.cpp:34:11:34:20 | call to user_input | ArgumentNode is missing PostUpdateNode. |
114+
| constructors.cpp:34:25:34:25 | 0 | ArgumentNode is missing PostUpdateNode. |
115+
| constructors.cpp:35:11:35:11 | 0 | ArgumentNode is missing PostUpdateNode. |
116+
| constructors.cpp:35:14:35:23 | call to user_input | ArgumentNode is missing PostUpdateNode. |
117+
| constructors.cpp:36:11:36:20 | call to user_input | ArgumentNode is missing PostUpdateNode. |
118+
| constructors.cpp:36:25:36:34 | call to user_input | ArgumentNode is missing PostUpdateNode. |
119+
| constructors.cpp:37:11:37:11 | 0 | ArgumentNode is missing PostUpdateNode. |
120+
| constructors.cpp:37:14:37:14 | 0 | ArgumentNode is missing PostUpdateNode. |
121+
| simple.cpp:28:12:28:12 | call to a | ArgumentNode is missing PostUpdateNode. |
122+
| simple.cpp:29:12:29:12 | call to b | ArgumentNode is missing PostUpdateNode. |
123+
| simple.cpp:34:11:34:11 | 0 | ArgumentNode is missing PostUpdateNode. |
124+
| simple.cpp:34:14:34:14 | 0 | ArgumentNode is missing PostUpdateNode. |
125+
| simple.cpp:35:11:35:11 | 0 | ArgumentNode is missing PostUpdateNode. |
126+
| simple.cpp:35:14:35:14 | 0 | ArgumentNode is missing PostUpdateNode. |
127+
| simple.cpp:36:11:36:11 | 0 | ArgumentNode is missing PostUpdateNode. |
128+
| simple.cpp:36:14:36:14 | 0 | ArgumentNode is missing PostUpdateNode. |
129+
| simple.cpp:37:11:37:11 | 0 | ArgumentNode is missing PostUpdateNode. |
130+
| simple.cpp:37:14:37:14 | 0 | ArgumentNode is missing PostUpdateNode. |
131+
| simple.cpp:39:12:39:21 | call to user_input | ArgumentNode is missing PostUpdateNode. |
132+
| simple.cpp:40:12:40:21 | call to user_input | ArgumentNode is missing PostUpdateNode. |
133+
| simple.cpp:41:12:41:21 | call to user_input | ArgumentNode is missing PostUpdateNode. |
134+
| simple.cpp:42:12:42:21 | call to user_input | ArgumentNode is missing PostUpdateNode. |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import semmle.code.cpp.dataflow.internal.DataFlowImplConsistency::Consistency

0 commit comments

Comments
 (0)