Files
codeql/rust/ql/test/extractor-tests/generated/RefExpr/RefExpr.ql
2025-06-25 12:02:13 +02:00

26 lines
803 B
Plaintext
Generated

// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
query predicate instances(
RefExpr x, string isConst__label, string isConst, string isMut__label, string isMut,
string isRaw__label, string isRaw
) {
toBeTested(x) and
not x.isUnknown() and
isConst__label = "isConst:" and
(if x.isConst() then isConst = "yes" else isConst = "no") and
isMut__label = "isMut:" and
(if x.isMut() then isMut = "yes" else isMut = "no") and
isRaw__label = "isRaw:" and
if x.isRaw() then isRaw = "yes" else isRaw = "no"
}
query predicate getAttr(RefExpr x, int index, Attr getAttr) {
toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index)
}
query predicate getExpr(RefExpr x, Expr getExpr) {
toBeTested(x) and not x.isUnknown() and getExpr = x.getExpr()
}