Skip to content

Commit ec8d5f0

Browse files
committed
Rust: Use extractor resolution in call resolution telemetry
1 parent cad0c79 commit ec8d5f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rust/ql/src/queries/telemetry/DatabaseQuality.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ private class RelevantFile extends File {
2121
module 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

0 commit comments

Comments
 (0)