Rust: Exclude skipped files from MacroCallTargetStats.

This commit is contained in:
Geoffrey White
2025-10-28 11:46:54 +00:00
parent 6f1eca8be1
commit 25e4b790a3

View File

@@ -31,11 +31,21 @@ module CallTargetStats implements StatsSig {
} }
module MacroCallTargetStats implements StatsSig { module MacroCallTargetStats implements StatsSig {
int getNumberOfOk() { result = count(MacroCall c | c.hasMacroCallExpansion()) } int getNumberOfOk() {
result =
count(MacroCall c |
not c.getFile().(ExtractedFile).isSkippedByCompilation() and c.hasMacroCallExpansion()
)
}
additional predicate isNotOkCall(MacroCall c) { not c.hasMacroCallExpansion() } additional predicate isNotOkCall(MacroCall c) { not c.hasMacroCallExpansion() }
int getNumberOfNotOk() { result = count(MacroCall c | isNotOkCall(c)) } int getNumberOfNotOk() {
result =
count(MacroCall c |
not c.getFile().(ExtractedFile).isSkippedByCompilation() and isNotOkCall(c)
)
}
string getOkText() { result = "macro calls with call target" } string getOkText() { result = "macro calls with call target" }