mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
31 lines
950 B
Plaintext
Generated
31 lines
950 B
Plaintext
Generated
// generated by codegen, do not edit
|
|
import codeql.rust.elements
|
|
import TestUtils
|
|
|
|
query predicate instances(
|
|
SelfParam x, string isRef__label, string isRef, string isMut__label, string isMut
|
|
) {
|
|
toBeTested(x) and
|
|
not x.isUnknown() and
|
|
isRef__label = "isRef:" and
|
|
(if x.isRef() then isRef = "yes" else isRef = "no") and
|
|
isMut__label = "isMut:" and
|
|
if x.isMut() then isMut = "yes" else isMut = "no"
|
|
}
|
|
|
|
query predicate getAttr(SelfParam x, int index, Attr getAttr) {
|
|
toBeTested(x) and not x.isUnknown() and getAttr = x.getAttr(index)
|
|
}
|
|
|
|
query predicate getTypeRepr(SelfParam x, TypeRepr getTypeRepr) {
|
|
toBeTested(x) and not x.isUnknown() and getTypeRepr = x.getTypeRepr()
|
|
}
|
|
|
|
query predicate getLifetime(SelfParam x, Lifetime getLifetime) {
|
|
toBeTested(x) and not x.isUnknown() and getLifetime = x.getLifetime()
|
|
}
|
|
|
|
query predicate getName(SelfParam x, Name getName) {
|
|
toBeTested(x) and not x.isUnknown() and getName = x.getName()
|
|
}
|