Skip to content

Commit d178d84

Browse files
authored
Merge pull request #17995 from paldepind/rust-df-source-sink-fix
Rust: Fix default source and sink in inline flow test
2 parents 63bc1ef + 0e025ab commit d178d84

File tree

20 files changed

+380
-375
lines changed

20 files changed

+380
-375
lines changed

rust/ql/.generated.list

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/.gitattributes

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// generated by codegen, remove this comment if you wish to edit this file
21
/**
32
* This module provides a hand-modifiable wrapper around the generated class `PathExpr`.
43
*
@@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.PathExpr
1211
* be referenced directly.
1312
*/
1413
module Impl {
14+
// the following QLdoc is generated: if you need to edit it, do it in the schema file
1515
/**
1616
* A path expression. For example:
1717
* ```rust
@@ -21,5 +21,7 @@ module Impl {
2121
* let z = <TypeRef as Trait>::foo;
2222
* ```
2323
*/
24-
class PathExpr extends Generated::PathExpr { }
24+
class PathExpr extends Generated::PathExpr {
25+
override string toString() { result = this.getPath().toString() }
26+
}
2527
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | PathExpr |
2-
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | PathExpr |
3-
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | PathExpr |
4-
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | PathExpr |
5-
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | PathExpr |
1+
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | x |
2+
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | x |
3+
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | x |
4+
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | x |
5+
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | x |
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | PathExpr |
2-
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | PathExpr |
3-
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | PathExpr |
4-
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | PathExpr |
5-
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | PathExpr |
1+
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | y |
2+
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | y |
3+
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | y |
4+
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | y |
5+
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | y |
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| gen_call_expr.rs:5:5:5:11 | CallExpr | gen_call_expr.rs:5:5:5:7 | PathExpr |
2-
| gen_call_expr.rs:6:5:6:23 | CallExpr | gen_call_expr.rs:6:5:6:19 | PathExpr |
1+
| gen_call_expr.rs:5:5:5:11 | CallExpr | gen_call_expr.rs:5:5:5:7 | foo |
2+
| gen_call_expr.rs:6:5:6:23 | CallExpr | gen_call_expr.rs:6:5:6:19 | foo::<...> |
33
| gen_call_expr.rs:7:5:7:14 | CallExpr | gen_call_expr.rs:7:5:7:10 | IndexExpr |
4-
| gen_call_expr.rs:8:5:8:10 | CallExpr | gen_call_expr.rs:8:5:8:7 | PathExpr |
4+
| gen_call_expr.rs:8:5:8:10 | CallExpr | gen_call_expr.rs:8:5:8:7 | foo |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| gen_cast_expr.rs:5:5:5:16 | CastExpr | gen_cast_expr.rs:5:5:5:9 | PathExpr |
1+
| gen_cast_expr.rs:5:5:5:16 | CastExpr | gen_cast_expr.rs:5:5:5:9 | value |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| gen_field_expr.rs:5:5:5:9 | FieldExpr | gen_field_expr.rs:5:5:5:5 | PathExpr |
1+
| gen_field_expr.rs:5:5:5:9 | FieldExpr | gen_field_expr.rs:5:5:5:5 | x |
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| gen_index_expr.rs:5:5:5:12 | IndexExpr | gen_index_expr.rs:5:5:5:8 | PathExpr |
2-
| gen_index_expr.rs:6:5:6:12 | IndexExpr | gen_index_expr.rs:6:5:6:8 | PathExpr |
1+
| gen_index_expr.rs:5:5:5:12 | IndexExpr | gen_index_expr.rs:5:5:5:8 | list |
2+
| gen_index_expr.rs:6:5:6:12 | IndexExpr | gen_index_expr.rs:6:5:6:8 | list |

rust/ql/test/extractor-tests/generated/MacroItems/CONSISTENCY/DataFlowConsistency.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ uniqueNodeLocation
33
| file://:0:0:0:0 | ... .unwrap(...) | Node should have one location but has 0. |
44
| file://:0:0:0:0 | BlockExpr | Node should have one location but has 0. |
55
| file://:0:0:0:0 | Param | Node should have one location but has 0. |
6-
| file://:0:0:0:0 | PathExpr | Node should have one location but has 0. |
6+
| file://:0:0:0:0 | path | Node should have one location but has 0. |
77
missingLocation
88
| Nodes without location: 5 |

0 commit comments

Comments
 (0)