Rust: rerun code generation

This commit is contained in:
Paolo Tranquilli
2025-02-25 13:29:17 +01:00
parent 17703ec908
commit cbae16b392
13 changed files with 62 additions and 12 deletions

View File

@@ -2,13 +2,16 @@
import codeql.rust.elements
import TestUtils
from RecordField x, int getNumberOfAttrs, string hasName, string hasTypeRepr, string hasVisibility
from
RecordField x, int getNumberOfAttrs, string hasExpr, string hasName, string hasTypeRepr,
string hasVisibility
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasExpr() then hasExpr = "yes" else hasExpr = "no") and
(if x.hasName() then hasName = "yes" else hasName = "no") and
(if x.hasTypeRepr() then hasTypeRepr = "yes" else hasTypeRepr = "no") and
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasName:", hasName, "hasTypeRepr:", hasTypeRepr,
"hasVisibility:", hasVisibility
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasExpr:", hasExpr, "hasName:", hasName,
"hasTypeRepr:", hasTypeRepr, "hasVisibility:", hasVisibility

View File

@@ -0,0 +1,7 @@
// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
from RecordField x
where toBeTested(x) and not x.isUnknown()
select x, x.getExpr()