Skip to content

Commit cb991fb

Browse files
authored
QL: run the query on our on code, and fix an error
1 parent 913cf53 commit cb991fb

2 files changed

Lines changed: 33 additions & 33 deletions

File tree

ql/src/codeql_ql/ast/Ast.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class TypeExpr extends TType, AstNode {
203203

204204
TypeExpr() { this = TType(type) }
205205

206-
override string getAPrimaryQlClass() { result = "Type" }
206+
override string getAPrimaryQlClass() { result = "TypeExpr" }
207207

208208
/**
209209
* Gets the class name for the type.

ql/test/printAst/printAst.expected

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ nodes
55
| Foo.qll:1:1:25:2 | TopLevel | semmle.order | 1 |
66
| Foo.qll:3:1:7:1 | Class | semmle.label | [Class] Class |
77
| Foo.qll:3:1:7:1 | Class | semmle.order | 3 |
8-
| Foo.qll:3:19:3:22 | Type | semmle.label | [Type] Type |
9-
| Foo.qll:3:19:3:22 | Type | semmle.order | 4 |
8+
| Foo.qll:3:19:3:22 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
9+
| Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 |
1010
| Foo.qll:4:3:4:17 | CharPred | semmle.label | [CharPred] CharPred |
1111
| Foo.qll:4:3:4:17 | CharPred | semmle.order | 5 |
1212
| Foo.qll:4:11:4:11 | Integer | semmle.label | [Integer] Integer |
@@ -17,8 +17,8 @@ nodes
1717
| Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 8 |
1818
| Foo.qll:4:15:4:15 | Integer | semmle.label | [Integer] Integer |
1919
| Foo.qll:4:15:4:15 | Integer | semmle.order | 9 |
20-
| Foo.qll:6:3:6:8 | Type | semmle.label | [Type] Type |
21-
| Foo.qll:6:3:6:8 | Type | semmle.order | 10 |
20+
| Foo.qll:6:3:6:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
21+
| Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 10 |
2222
| Foo.qll:6:3:6:38 | ClassPredicate | semmle.label | [ClassPredicate] ClassPredicate |
2323
| Foo.qll:6:3:6:38 | ClassPredicate | semmle.order | 10 |
2424
| Foo.qll:6:23:6:28 | Identifier | semmle.label | [Identifier] Identifier |
@@ -31,8 +31,8 @@ nodes
3131
| Foo.qll:6:32:6:36 | String | semmle.order | 15 |
3232
| Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate |
3333
| Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 16 |
34-
| Foo.qll:9:21:9:23 | Type | semmle.label | [Type] Type |
35-
| Foo.qll:9:21:9:23 | Type | semmle.order | 17 |
34+
| Foo.qll:9:21:9:23 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
35+
| Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 17 |
3636
| Foo.qll:9:21:9:25 | VarDecl | semmle.label | [VarDecl] VarDecl |
3737
| Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 |
3838
| Foo.qll:10:3:10:3 | Identifier | semmle.label | [Identifier] Identifier |
@@ -45,8 +45,8 @@ nodes
4545
| Foo.qll:10:7:10:85 | Rank | semmle.order | 22 |
4646
| Foo.qll:10:12:10:12 | Integer | semmle.label | [Integer] Integer |
4747
| Foo.qll:10:12:10:12 | Integer | semmle.order | 23 |
48-
| Foo.qll:10:15:10:17 | Type | semmle.label | [Type] Type |
49-
| Foo.qll:10:15:10:17 | Type | semmle.order | 24 |
48+
| Foo.qll:10:15:10:17 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
49+
| Foo.qll:10:15:10:17 | TypeExpr | semmle.order | 24 |
5050
| Foo.qll:10:15:10:23 | VarDecl | semmle.label | [VarDecl] VarDecl |
5151
| Foo.qll:10:15:10:23 | VarDecl | semmle.order | 24 |
5252
| Foo.qll:10:27:10:31 | Identifier | semmle.label | [Identifier] Identifier |
@@ -69,8 +69,8 @@ nodes
6969
| Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 |
7070
| Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | [ClasslessPredicate] ClasslessPredicate |
7171
| Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 35 |
72-
| Foo.qll:13:17:13:19 | Type | semmle.label | [Type] Type |
73-
| Foo.qll:13:17:13:19 | Type | semmle.order | 36 |
72+
| Foo.qll:13:17:13:19 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
73+
| Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 36 |
7474
| Foo.qll:13:17:13:21 | VarDecl | semmle.label | [VarDecl] VarDecl |
7575
| Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 |
7676
| Foo.qll:14:3:14:10 | PredicateCall | semmle.label | [PredicateCall] PredicateCall |
@@ -111,8 +111,8 @@ nodes
111111
| Foo.qll:18:3:18:20 | MemberCall | semmle.order | 53 |
112112
| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
113113
| Foo.qll:18:3:18:28 | ComparisonFormula | semmle.order | 53 |
114-
| Foo.qll:18:6:18:8 | Type | semmle.label | [Type] Type |
115-
| Foo.qll:18:6:18:8 | Type | semmle.order | 57 |
114+
| Foo.qll:18:6:18:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
115+
| Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 |
116116
| Foo.qll:18:22:18:22 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
117117
| Foo.qll:18:22:18:22 | ComparisonOp | semmle.order | 58 |
118118
| Foo.qll:18:24:18:28 | String | semmle.label | [String] String |
@@ -123,8 +123,8 @@ nodes
123123
| Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 |
124124
| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.label | [ComparisonFormula] ComparisonFormula |
125125
| Foo.qll:20:3:20:13 | ComparisonFormula | semmle.order | 60 |
126-
| Foo.qll:20:6:20:8 | Type | semmle.label | [Type] Type |
127-
| Foo.qll:20:6:20:8 | Type | semmle.order | 63 |
126+
| Foo.qll:20:6:20:8 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
127+
| Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 |
128128
| Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | [ComparisonOp] ComparisonOp |
129129
| Foo.qll:20:11:20:11 | ComparisonOp | semmle.order | 64 |
130130
| Foo.qll:20:13:20:13 | Identifier | semmle.label | [Identifier] Identifier |
@@ -137,8 +137,8 @@ nodes
137137
| Foo.qll:22:5:22:5 | ComparisonOp | semmle.order | 68 |
138138
| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.label | [Aggregate[any]] Aggregate[any] |
139139
| Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 |
140-
| Foo.qll:22:11:22:13 | Type | semmle.label | [Type] Type |
141-
| Foo.qll:22:11:22:13 | Type | semmle.order | 70 |
140+
| Foo.qll:22:11:22:13 | TypeExpr | semmle.label | [TypeExpr] TypeExpr |
141+
| Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 |
142142
| Foo.qll:22:11:22:15 | VarDecl | semmle.label | [VarDecl] VarDecl |
143143
| Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 |
144144
| Foo.qll:24:7:24:11 | AnyCall | semmle.label | [AnyCall] AnyCall |
@@ -156,8 +156,8 @@ edges
156156
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:9:7:11:1 | ClasslessPredicate | semmle.order | 16 |
157157
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.label | 4 |
158158
| Foo.qll:1:1:25:2 | TopLevel | Foo.qll:13:1:25:1 | ClasslessPredicate | semmle.order | 35 |
159-
| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.label | 1 |
160-
| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | Type | semmle.order | 4 |
159+
| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | TypeExpr | semmle.label | 1 |
160+
| Foo.qll:3:1:7:1 | Class | Foo.qll:3:19:3:22 | TypeExpr | semmle.order | 4 |
161161
| Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.label | 2 |
162162
| Foo.qll:3:1:7:1 | Class | Foo.qll:4:3:4:17 | CharPred | semmle.order | 5 |
163163
| Foo.qll:3:1:7:1 | Class | Foo.qll:6:3:6:38 | ClassPredicate | semmle.label | 3 |
@@ -170,8 +170,8 @@ edges
170170
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:13:4:13 | ComparisonOp | semmle.order | 8 |
171171
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.label | 3 |
172172
| Foo.qll:4:11:4:15 | ComparisonFormula | Foo.qll:4:15:4:15 | Integer | semmle.order | 9 |
173-
| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.label | 1 |
174-
| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | Type | semmle.order | 10 |
173+
| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | TypeExpr | semmle.label | 1 |
174+
| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:3:6:8 | TypeExpr | semmle.order | 10 |
175175
| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.label | 2 |
176176
| Foo.qll:6:3:6:38 | ClassPredicate | Foo.qll:6:23:6:36 | ComparisonFormula | semmle.order | 12 |
177177
| Foo.qll:6:23:6:36 | ComparisonFormula | Foo.qll:6:23:6:28 | Identifier | semmle.label | 1 |
@@ -184,8 +184,8 @@ edges
184184
| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:9:21:9:25 | VarDecl | semmle.order | 17 |
185185
| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.label | 2 |
186186
| Foo.qll:9:7:11:1 | ClasslessPredicate | Foo.qll:10:3:10:85 | ComparisonFormula | semmle.order | 19 |
187-
| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.label | 1 |
188-
| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | Type | semmle.order | 17 |
187+
| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | TypeExpr | semmle.label | 1 |
188+
| Foo.qll:9:21:9:25 | VarDecl | Foo.qll:9:21:9:23 | TypeExpr | semmle.order | 17 |
189189
| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.label | 1 |
190190
| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:3:10:3 | Identifier | semmle.order | 19 |
191191
| Foo.qll:10:3:10:85 | ComparisonFormula | Foo.qll:10:5:10:5 | ComparisonOp | semmle.label | 2 |
@@ -202,8 +202,8 @@ edges
202202
| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:54:10:58 | AsExpr | semmle.order | 31 |
203203
| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.label | 5 |
204204
| Foo.qll:10:7:10:85 | Rank | Foo.qll:10:69:10:84 | MemberCall | semmle.order | 33 |
205-
| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.label | 1 |
206-
| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | Type | semmle.order | 24 |
205+
| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | TypeExpr | semmle.label | 1 |
206+
| Foo.qll:10:15:10:23 | VarDecl | Foo.qll:10:15:10:17 | TypeExpr | semmle.order | 24 |
207207
| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.label | 1 |
208208
| Foo.qll:10:27:10:42 | MemberCall | Foo.qll:10:27:10:31 | Identifier | semmle.order | 26 |
209209
| Foo.qll:10:27:10:50 | ComparisonFormula | Foo.qll:10:27:10:42 | MemberCall | semmle.label | 1 |
@@ -220,8 +220,8 @@ edges
220220
| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:13:17:13:21 | VarDecl | semmle.order | 36 |
221221
| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.label | 2 |
222222
| Foo.qll:13:1:25:1 | ClasslessPredicate | Foo.qll:14:3:24:15 | Disjunction | semmle.order | 38 |
223-
| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.label | 1 |
224-
| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | Type | semmle.order | 36 |
223+
| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.label | 1 |
224+
| Foo.qll:13:17:13:21 | VarDecl | Foo.qll:13:17:13:19 | TypeExpr | semmle.order | 36 |
225225
| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.label | 1 |
226226
| Foo.qll:14:3:14:10 | PredicateCall | Foo.qll:14:9:14:9 | Identifier | semmle.order | 44 |
227227
| Foo.qll:14:3:16:29 | Disjunction | Foo.qll:14:3:14:10 | PredicateCall | semmle.label | 1 |
@@ -260,8 +260,8 @@ edges
260260
| Foo.qll:16:11:16:29 | MemberCall | Foo.qll:16:28:16:28 | Integer | semmle.order | 52 |
261261
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.label | 1 |
262262
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:3:18:3 | Identifier | semmle.order | 53 |
263-
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.label | 2 |
264-
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | Type | semmle.order | 57 |
263+
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.label | 2 |
264+
| Foo.qll:18:3:18:9 | InlineCast | Foo.qll:18:6:18:8 | TypeExpr | semmle.order | 57 |
265265
| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.label | 1 |
266266
| Foo.qll:18:3:18:20 | MemberCall | Foo.qll:18:3:18:9 | InlineCast | semmle.order | 53 |
267267
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:3:18:20 | MemberCall | semmle.label | 1 |
@@ -272,8 +272,8 @@ edges
272272
| Foo.qll:18:3:18:28 | ComparisonFormula | Foo.qll:18:24:18:28 | String | semmle.order | 59 |
273273
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.label | 1 |
274274
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:3:20:3 | Identifier | semmle.order | 60 |
275-
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.label | 2 |
276-
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | Type | semmle.order | 63 |
275+
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.label | 2 |
276+
| Foo.qll:20:3:20:9 | InlineCast | Foo.qll:20:6:20:8 | TypeExpr | semmle.order | 63 |
277277
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.label | 1 |
278278
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:3:20:9 | InlineCast | semmle.order | 60 |
279279
| Foo.qll:20:3:20:13 | ComparisonFormula | Foo.qll:20:11:20:11 | ComparisonOp | semmle.label | 2 |
@@ -288,8 +288,8 @@ edges
288288
| Foo.qll:22:3:22:16 | ComparisonFormula | Foo.qll:22:7:22:16 | Aggregate[any] | semmle.order | 69 |
289289
| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.label | 1 |
290290
| Foo.qll:22:7:22:16 | Aggregate[any] | Foo.qll:22:11:22:15 | VarDecl | semmle.order | 70 |
291-
| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.label | 1 |
292-
| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | Type | semmle.order | 70 |
291+
| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | TypeExpr | semmle.label | 1 |
292+
| Foo.qll:22:11:22:15 | VarDecl | Foo.qll:22:11:22:13 | TypeExpr | semmle.order | 70 |
293293
| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.label | 1 |
294294
| printAst.ql:1:1:1:29 | TopLevel | printAst.ql:1:1:1:28 | Import | semmle.order | 73 |
295295
graphProperties

0 commit comments

Comments
 (0)