Rust: Implement suggestion from review.

This commit is contained in:
Geoffrey White
2025-10-29 12:13:12 +00:00
parent 5ca0bd071d
commit 7a864c5244

View File

@@ -49,12 +49,12 @@ module MacroCallTargetStats implements StatsSig {
result = count(MacroCall c | c.getFile() instanceof RelevantFile and c.hasMacroCallExpansion()) result = count(MacroCall c | c.getFile() instanceof RelevantFile and c.hasMacroCallExpansion())
} }
additional predicate isNotOkCall(MacroCall c) { not c.hasMacroCallExpansion() } additional predicate isNotOkCall(MacroCall c) {
c.getFile() instanceof RelevantFile and not c.hasMacroCallExpansion()
int getNumberOfNotOk() {
result = count(MacroCall c | c.getFile() instanceof RelevantFile and isNotOkCall(c))
} }
int getNumberOfNotOk() { result = count(MacroCall c | isNotOkCall(c)) }
string getOkText() { result = "macro calls with call target" } string getOkText() { result = "macro calls with call target" }
string getNotOkText() { result = "macro calls with missing call target" } string getNotOkText() { result = "macro calls with missing call target" }