Skip to content

Commit 92528f2

Browse files
committed
Rust: Add debug predicate
1 parent e2d6643 commit 92528f2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ private module Compare<ResolvableSig R, CompareSig<R> RustAnalyzer, CompareSig<R
5959

6060
predicate qlUniqueCount(int c) { c = count(Source s | qlUnique(s)) }
6161

62+
// debug predicates to find missing targets in QL implementation
63+
private module Debug {
64+
predicate qlMissing(Source s, Target t) {
65+
t = RustAnalyzer::resolve(s) and
66+
not t = Ql::resolve(s)
67+
}
68+
69+
predicate qlMissingWithCount(Source s, Target t, int c) {
70+
qlMissing(s, t) and
71+
c = strictcount(Source s0 | qlMissing(s0, t))
72+
}
73+
}
74+
6275
predicate summary(string key, int value) {
6376
key = "rust-analyzer unique" and rustAnalyzerUniqueCount(value)
6477
or

0 commit comments

Comments
 (0)