Rust: fix QL compilation errors

This commit is contained in:
Paolo Tranquilli
2025-04-30 15:25:01 +02:00
parent a7a887c828
commit ecd80fbc34
4 changed files with 6 additions and 6 deletions

View File

@@ -8,5 +8,5 @@
import rust import rust
from MacroCall mc from MacroCall mc
where not mc.hasExpanded() where not mc.hasMacroCallExpansion()
select mc, "Macro call was not resolved to a target." select mc, "Macro call was not resolved to a target."

View File

@@ -136,9 +136,9 @@ predicate extractionStats(string key, int value) {
or or
key = "Macro calls - total" and value = count(MacroCall mc) key = "Macro calls - total" and value = count(MacroCall mc)
or or
key = "Macro calls - resolved" and value = count(MacroCall mc | mc.hasExpanded()) key = "Macro calls - resolved" and value = count(MacroCall mc | mc.hasMacroCallExpansion())
or or
key = "Macro calls - unresolved" and value = count(MacroCall mc | not mc.hasExpanded()) key = "Macro calls - unresolved" and value = count(MacroCall mc | not mc.hasMacroCallExpansion())
} }
/** /**

View File

@@ -30,9 +30,9 @@ module CallTargetStats implements StatsSig {
} }
module MacroCallTargetStats implements StatsSig { module MacroCallTargetStats implements StatsSig {
int getNumberOfOk() { result = count(MacroCall c | c.hasExpanded()) } int getNumberOfOk() { result = count(MacroCall c | c.hasMacroCallExpansion()) }
additional predicate isNotOkCall(MacroCall c) { not c.hasExpanded() } additional predicate isNotOkCall(MacroCall c) { not c.hasMacroCallExpansion() }
int getNumberOfNotOk() { result = count(MacroCall c | isNotOkCall(c)) } int getNumberOfNotOk() { result = count(MacroCall c | isNotOkCall(c)) }

View File

@@ -25,7 +25,7 @@ class IncompleteCallable extends Callable {
IncompleteCallable() { IncompleteCallable() {
exists(MacroExpr me | exists(MacroExpr me |
me.getEnclosingCallable() = this and me.getEnclosingCallable() = this and
not me.getMacroCall().hasExpanded() not me.getMacroCall().hasMacroCallExpansion()
) )
} }
} }