mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Rust: fix QL compilation errors
This commit is contained in:
@@ -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."
|
||||||
|
|||||||
@@ -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())
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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)) }
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user