File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed
lib/codeql/rust/controlflow/internal Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -524,10 +524,7 @@ class MatchExprTree extends PostOrderTree instanceof MatchExpr {
524
524
525
525
class MethodCallExprTree extends StandardPostOrderTree , MethodCallExpr {
526
526
override AstNode getChildNode ( int i ) {
527
- i = 0 and
528
- result = this .getReceiver ( )
529
- or
530
- result = this .getArgList ( ) .getArg ( i + 1 )
527
+ if i = 0 then result = this .getReceiver ( ) else result = this .getArgList ( ) .getArg ( i - 1 )
531
528
}
532
529
}
533
530
Original file line number Diff line number Diff line change 19
19
| test.rs:10:13:10:19 | map | test.rs:11:9:11:28 | ExprStmt | match |
20
20
| test.rs:10:23:10:34 | PathExpr | test.rs:10:23:10:36 | CallExpr | |
21
21
| test.rs:10:23:10:36 | CallExpr | test.rs:10:13:10:19 | map | |
22
- | test.rs:11:9:11:11 | map | test.rs:11:9 :11:27 | MethodCallExpr | |
22
+ | test.rs:11:9:11:11 | map | test.rs:11:20 :11:21 | 37 | |
23
23
| test.rs:11:9:11:27 | MethodCallExpr | test.rs:9:22:12:5 | BlockExpr | |
24
- | test.rs:11:9:11:28 | ExprStmt | test.rs:11:20:11:21 | 37 | |
25
- | test.rs:11:20:11:21 | 37 | test.rs:11:9:11:11 | map | |
24
+ | test.rs:11:9:11:28 | ExprStmt | test.rs:11:9:11:11 | map | |
26
25
| test.rs:11:20:11:21 | 37 | test.rs:11:24:11:26 | "a" | |
27
26
| test.rs:11:24:11:26 | "a" | test.rs:11:9:11:27 | MethodCallExpr | |
28
27
| test.rs:17:5:33:5 | enter test_break_and_continue | test.rs:17:32:17:32 | n | |
Original file line number Diff line number Diff line change @@ -707,10 +707,10 @@ edges
707
707
| variables.rs:332:5:332:17 | ExprStmt | variables.rs:332:5:332:13 | PathExpr | |
708
708
| variables.rs:332:15:332:15 | a | variables.rs:332:5:332:16 | CallExpr | |
709
709
| variables.rs:333:5:333:27 | MethodCallExpr | variables.rs:334:5:334:17 | ExprStmt | |
710
- | variables.rs:333:5:333:28 | ExprStmt | variables.rs:333:25 :333:26 | 10 | |
711
- | variables.rs:333:6:333:11 | RefExpr | variables.rs:333:5 :333:27 | MethodCallExpr | |
710
+ | variables.rs:333:5:333:28 | ExprStmt | variables.rs:333:11 :333:11 | a | |
711
+ | variables.rs:333:6:333:11 | RefExpr | variables.rs:333:25 :333:26 | 10 | |
712
712
| variables.rs:333:11:333:11 | a | variables.rs:333:6:333:11 | RefExpr | |
713
- | variables.rs:333:25:333:26 | 10 | variables.rs:333:11 :333:11 | a | |
713
+ | variables.rs:333:25:333:26 | 10 | variables.rs:333:5 :333:27 | MethodCallExpr | |
714
714
| variables.rs:334:5:334:13 | PathExpr | variables.rs:334:15:334:15 | a | |
715
715
| variables.rs:334:5:334:16 | CallExpr | variables.rs:329:17:335:1 | BlockExpr | |
716
716
| variables.rs:334:5:334:17 | ExprStmt | variables.rs:334:5:334:13 | PathExpr | |
You can’t perform that action at this time.
0 commit comments