🌐 AI搜索 & 代理 主页
Skip to content

Commit 31b184a

Browse files
committed
Rust: Exclude deref expressions on raw pointers from call resolution stats
1 parent bfa37b8 commit 31b184a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import rust
88
import codeql.util.ReportStats
99
import codeql.rust.elements.internal.CallExprImpl::Impl as CallExprImpl
1010
import codeql.rust.internal.TypeInference as TypeInference
11+
import codeql.rust.internal.Type
1112

1213
/**
1314
* A file that is included in the quality statistics.
@@ -30,7 +31,8 @@ module CallTargetStats implements StatsSig {
3031
RelevantInvocationExpr() {
3132
this.getFile() instanceof RelevantFile and
3233
not this instanceof CallExprImpl::DynamicCallExpr and
33-
not this = any(Operation o | not o.isOverloaded(_, _, _))
34+
not this = any(Operation o | not o.isOverloaded(_, _, _)) and
35+
not this = any(DerefExpr de | TypeInference::inferType(de.getExpr()) instanceof PtrType)
3436
}
3537
}
3638

0 commit comments

Comments
 (0)