File tree Expand file tree Collapse file tree 7 files changed +17
-2
lines changed Expand file tree Collapse file tree 7 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ private class RelevantFile extends File {
2121module CallTargetStats implements StatsSig {
2222 int getNumberOfOk ( ) {
2323 result =
24- count ( CallExprBase c | c .getFile ( ) instanceof RelevantFile and exists ( c .getStaticTarget ( ) ) )
24+ count ( CallExprBase c |
25+ c .getFile ( ) instanceof RelevantFile and
26+ c .( Resolvable ) .hasResolvedPath ( )
27+ )
2528 }
2629
2730 private predicate isLambdaCall ( CallExpr call ) {
@@ -33,7 +36,7 @@ module CallTargetStats implements StatsSig {
3336
3437 additional predicate isNotOkCall ( CallExprBase c ) {
3538 c .getFile ( ) instanceof RelevantFile and
36- not exists ( c . getStaticTarget ( ) ) and
39+ not c . ( Resolvable ) . hasResolvedPath ( ) and
3740 not isLambdaCall ( c )
3841 }
3942
Original file line number Diff line number Diff line change 88getArg
99| gen_method_call_expr.rs:5:5:5:13 | x.foo(...) | 0 | gen_method_call_expr.rs:5:11:5:12 | 42 |
1010| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | 0 | gen_method_call_expr.rs:6:23:6:24 | 42 |
11+ getResolvedPath
12+ getResolvedCrateOrigin
1113getGenericArgList
1214| gen_method_call_expr.rs:6:5:6:25 | x.foo(...) | gen_method_call_expr.rs:6:10:6:21 | <...> |
1315getIdentifier
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ instances
55| gen_path_expr.rs:7:13:7:20 | ...::foo |
66| gen_path_expr.rs:8:13:8:36 | ...::foo |
77| gen_path_pat.rs:5:11:5:11 | x |
8+ getResolvedPath
9+ getResolvedCrateOrigin
810getPath
911| gen_path.rs:6:5:6:12 | ...::bar | gen_path.rs:6:5:6:12 | ...::bar |
1012| gen_path_expr.rs:5:13:5:20 | variable | gen_path_expr.rs:5:13:5:20 | variable |
Original file line number Diff line number Diff line change 11instances
22| gen_path_pat.rs:6:9:6:16 | ...::Bar |
3+ getResolvedPath
4+ getResolvedCrateOrigin
35getPath
46| gen_path_pat.rs:6:9:6:16 | ...::Bar | gen_path_pat.rs:6:9:6:16 | ...::Bar |
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ instances
33| gen_struct_expr.rs:6:18:6:38 | Foo {...} |
44| gen_struct_expr.rs:7:13:7:30 | Foo {...} |
55| gen_struct_expr.rs:8:5:8:20 | Foo {...} |
6+ getResolvedPath
7+ getResolvedCrateOrigin
68getPath
79| gen_struct_expr.rs:5:17:5:34 | Foo {...} | gen_struct_expr.rs:5:17:5:19 | Foo |
810| gen_struct_expr.rs:6:18:6:38 | Foo {...} | gen_struct_expr.rs:6:18:6:20 | Foo |
Original file line number Diff line number Diff line change 11instances
22| gen_struct_pat.rs:6:9:6:26 | Foo {...} |
33| gen_struct_pat.rs:7:9:7:18 | Foo {...} |
4+ getResolvedPath
5+ getResolvedCrateOrigin
46getPath
57| gen_struct_pat.rs:6:9:6:26 | Foo {...} | gen_struct_pat.rs:6:9:6:11 | Foo |
68| gen_struct_pat.rs:7:9:7:18 | Foo {...} | gen_struct_pat.rs:7:9:7:11 | Foo |
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ instances
22| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) |
33| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) |
44| gen_tuple_struct_pat.rs:8:9:8:17 | Tuple(...) |
5+ getResolvedPath
6+ getResolvedCrateOrigin
57getPath
68| gen_tuple_struct_pat.rs:6:9:6:27 | Tuple(...) | gen_tuple_struct_pat.rs:6:9:6:13 | Tuple |
79| gen_tuple_struct_pat.rs:7:9:7:20 | Tuple(...) | gen_tuple_struct_pat.rs:7:9:7:13 | Tuple |
You can’t perform that action at this time.
0 commit comments