Rust: codegen

This commit is contained in:
Arthur Baars
2024-09-20 11:00:12 +02:00
parent 57458d8f38
commit a9423f4bdb
467 changed files with 4623 additions and 489 deletions

View File

@@ -1,4 +0,0 @@
// generated by codegen, do not edit
After a source file is added in this directory and codegen is run again, test queries
will appear and this file will be deleted

View File

@@ -0,0 +1,14 @@
// generated by codegen, do not edit
import codeql.rust.elements
import TestUtils
from Module x, int getNumberOfAttrs, string hasItemList, string hasName, string hasVisibility
where
toBeTested(x) and
not x.isUnknown() and
getNumberOfAttrs = x.getNumberOfAttrs() and
(if x.hasItemList() then hasItemList = "yes" else hasItemList = "no") and
(if x.hasName() then hasName = "yes" else hasName = "no") and
if x.hasVisibility() then hasVisibility = "yes" else hasVisibility = "no"
select x, "getNumberOfAttrs:", getNumberOfAttrs, "hasItemList:", hasItemList, "hasName:", hasName,
"hasVisibility:", hasVisibility

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,7 @@
// generated by codegen, do not edit
// A module declaration. For example:
mod foo;
mod bar {
pub fn baz() {}
}