Skip to content

Commit

Permalink
Merge pull request #17995 from paldepind/rust-df-source-sink-fix
Browse files Browse the repository at this point in the history
Rust: Fix default source and sink in inline flow test
  • Loading branch information
paldepind authored Nov 18, 2024
2 parents 63bc1ef + 0e025ab commit d178d84
Show file tree
Hide file tree
Showing 20 changed files with 380 additions and 375 deletions.
1 change: 0 additions & 1 deletion rust/ql/.generated.list

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion rust/ql/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions rust/ql/lib/codeql/rust/elements/internal/PathExprImpl.qll
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// generated by codegen, remove this comment if you wish to edit this file
/**
* This module provides a hand-modifiable wrapper around the generated class `PathExpr`.
*
Expand All @@ -12,6 +11,7 @@ private import codeql.rust.elements.internal.generated.PathExpr
* be referenced directly.
*/
module Impl {
// the following QLdoc is generated: if you need to edit it, do it in the schema file
/**
* A path expression. For example:
* ```rust
Expand All @@ -21,5 +21,7 @@ module Impl {
* let z = <TypeRef as Trait>::foo;
* ```
*/
class PathExpr extends Generated::PathExpr { }
class PathExpr extends Generated::PathExpr {
override string toString() { result = this.getPath().toString() }
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | PathExpr |
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | PathExpr |
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | PathExpr |
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | PathExpr |
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | PathExpr |
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:5:5:5 | x |
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:5:6:5 | x |
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:5:7:5 | x |
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:5:8:5 | x |
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:5:9:5 | x |
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | PathExpr |
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | PathExpr |
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | PathExpr |
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | PathExpr |
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | PathExpr |
| gen_binary_expr.rs:5:5:5:9 | ... + ... | gen_binary_expr.rs:5:9:5:9 | y |
| gen_binary_expr.rs:6:5:6:10 | ... && ... | gen_binary_expr.rs:6:10:6:10 | y |
| gen_binary_expr.rs:7:5:7:10 | ... <= ... | gen_binary_expr.rs:7:10:7:10 | y |
| gen_binary_expr.rs:8:5:8:9 | ... = ... | gen_binary_expr.rs:8:9:8:9 | y |
| gen_binary_expr.rs:9:5:9:10 | ... += ... | gen_binary_expr.rs:9:10:9:10 | y |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| gen_call_expr.rs:5:5:5:11 | CallExpr | gen_call_expr.rs:5:5:5:7 | PathExpr |
| gen_call_expr.rs:6:5:6:23 | CallExpr | gen_call_expr.rs:6:5:6:19 | PathExpr |
| gen_call_expr.rs:5:5:5:11 | CallExpr | gen_call_expr.rs:5:5:5:7 | foo |
| gen_call_expr.rs:6:5:6:23 | CallExpr | gen_call_expr.rs:6:5:6:19 | foo::<...> |
| gen_call_expr.rs:7:5:7:14 | CallExpr | gen_call_expr.rs:7:5:7:10 | IndexExpr |
| gen_call_expr.rs:8:5:8:10 | CallExpr | gen_call_expr.rs:8:5:8:7 | PathExpr |
| gen_call_expr.rs:8:5:8:10 | CallExpr | gen_call_expr.rs:8:5:8:7 | foo |
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| gen_cast_expr.rs:5:5:5:16 | CastExpr | gen_cast_expr.rs:5:5:5:9 | PathExpr |
| gen_cast_expr.rs:5:5:5:16 | CastExpr | gen_cast_expr.rs:5:5:5:9 | value |
Original file line number Diff line number Diff line change
@@ -1 +1 @@
| gen_field_expr.rs:5:5:5:9 | FieldExpr | gen_field_expr.rs:5:5:5:5 | PathExpr |
| gen_field_expr.rs:5:5:5:9 | FieldExpr | gen_field_expr.rs:5:5:5:5 | x |
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
| gen_index_expr.rs:5:5:5:12 | IndexExpr | gen_index_expr.rs:5:5:5:8 | PathExpr |
| gen_index_expr.rs:6:5:6:12 | IndexExpr | gen_index_expr.rs:6:5:6:8 | PathExpr |
| gen_index_expr.rs:5:5:5:12 | IndexExpr | gen_index_expr.rs:5:5:5:8 | list |
| gen_index_expr.rs:6:5:6:12 | IndexExpr | gen_index_expr.rs:6:5:6:8 | list |
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ uniqueNodeLocation
| file://:0:0:0:0 | ... .unwrap(...) | Node should have one location but has 0. |
| file://:0:0:0:0 | BlockExpr | Node should have one location but has 0. |
| file://:0:0:0:0 | Param | Node should have one location but has 0. |
| file://:0:0:0:0 | PathExpr | Node should have one location but has 0. |
| file://:0:0:0:0 | path | Node should have one location but has 0. |
missingLocation
| Nodes without location: 5 |
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
| gen_method_call_expr.rs:5:5:5:13 | ... .foo(...) | gen_method_call_expr.rs:5:5:5:5 | PathExpr |
| gen_method_call_expr.rs:6:5:6:25 | ... .foo(...) | gen_method_call_expr.rs:6:5:6:5 | PathExpr |
| gen_method_call_expr.rs:5:5:5:13 | ... .foo(...) | gen_method_call_expr.rs:5:5:5:5 | x |
| gen_method_call_expr.rs:6:5:6:25 | ... .foo(...) | gen_method_call_expr.rs:6:5:6:5 | x |
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uniqueNodeToString
| gen_path_expr.rs:7:13:7:20 | (no string representation) | Node should have one toString but has 0. |
| gen_path_expr.rs:8:13:8:35 | (no string representation) | Node should have one toString but has 0. |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| gen_path_expr.rs:5:13:5:20 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:6:13:6:20 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:7:13:7:20 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:8:13:8:35 | PathExpr | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:5:13:5:20 | variable | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:6:13:6:20 | foo::bar | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:7:13:7:20 | (no string representation) | getNumberOfAttrs: | 0 | hasPath: | yes |
| gen_path_expr.rs:8:13:8:35 | (no string representation) | getNumberOfAttrs: | 0 | hasPath: | yes |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| gen_path_expr.rs:5:13:5:20 | PathExpr | gen_path_expr.rs:5:13:5:20 | variable |
| gen_path_expr.rs:6:13:6:20 | PathExpr | gen_path_expr.rs:6:13:6:20 | foo::bar |
| gen_path_expr.rs:7:13:7:20 | PathExpr | gen_path_expr.rs:7:13:7:20 | (no string representation) |
| gen_path_expr.rs:8:13:8:35 | PathExpr | gen_path_expr.rs:8:13:8:35 | (no string representation) |
| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable |
| gen_path_expr.rs:6:13:6:20 | foo::bar | gen_path_expr.rs:6:13:6:20 | foo::bar |
| gen_path_expr.rs:7:13:7:20 | (no string representation) | gen_path_expr.rs:7:13:7:20 | (no string representation) |
| gen_path_expr.rs:8:13:8:35 | (no string representation) | gen_path_expr.rs:8:13:8:35 | (no string representation) |
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
| gen_prefix_expr.rs:5:13:5:15 | - ... | gen_prefix_expr.rs:5:14:5:15 | 42 |
| gen_prefix_expr.rs:6:13:6:17 | ! ... | gen_prefix_expr.rs:6:14:6:17 | true |
| gen_prefix_expr.rs:7:13:7:16 | * ... | gen_prefix_expr.rs:7:14:7:16 | PathExpr |
| gen_prefix_expr.rs:7:13:7:16 | * ... | gen_prefix_expr.rs:7:14:7:16 | ptr |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
| gen_ref_expr.rs:5:25:5:28 | RefExpr | gen_ref_expr.rs:5:26:5:28 | PathExpr |
| gen_ref_expr.rs:6:23:6:30 | RefExpr | gen_ref_expr.rs:6:28:6:30 | PathExpr |
| gen_ref_expr.rs:7:35:7:48 | RefExpr | gen_ref_expr.rs:7:46:7:48 | PathExpr |
| gen_ref_expr.rs:8:33:8:44 | RefExpr | gen_ref_expr.rs:8:42:8:44 | PathExpr |
| gen_ref_expr.rs:5:25:5:28 | RefExpr | gen_ref_expr.rs:5:26:5:28 | foo |
| gen_ref_expr.rs:6:23:6:30 | RefExpr | gen_ref_expr.rs:6:28:6:30 | foo |
| gen_ref_expr.rs:7:35:7:48 | RefExpr | gen_ref_expr.rs:7:46:7:48 | foo |
| gen_ref_expr.rs:8:33:8:44 | RefExpr | gen_ref_expr.rs:8:42:8:44 | foo |
Loading

0 comments on commit d178d84

Please sign in to comment.