mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Rust: add canonical_path and crate_origin to Item
This commit is contained in:
@@ -2,13 +2,18 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ExternBlock x, string hasAbi, int getNumberOfAttrs, string hasExternItemList, string isUnsafe
|
||||
from
|
||||
ExternBlock x, string hasCanonicalPath, string hasCrateOrigin, string hasAbi,
|
||||
int getNumberOfAttrs, string hasExternItemList, string isUnsafe
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
(if x.hasCanonicalPath() then hasCanonicalPath = "yes" else hasCanonicalPath = "no") and
|
||||
(if x.hasCrateOrigin() then hasCrateOrigin = "yes" else hasCrateOrigin = "no") and
|
||||
(if x.hasAbi() then hasAbi = "yes" else hasAbi = "no") and
|
||||
getNumberOfAttrs = x.getNumberOfAttrs() and
|
||||
(if x.hasExternItemList() then hasExternItemList = "yes" else hasExternItemList = "no") and
|
||||
if x.isUnsafe() then isUnsafe = "yes" else isUnsafe = "no"
|
||||
select x, "hasAbi:", hasAbi, "getNumberOfAttrs:", getNumberOfAttrs, "hasExternItemList:",
|
||||
hasExternItemList, "isUnsafe:", isUnsafe
|
||||
select x, "hasCanonicalPath:", hasCanonicalPath, "hasCrateOrigin:", hasCrateOrigin, "hasAbi:",
|
||||
hasAbi, "getNumberOfAttrs:", getNumberOfAttrs, "hasExternItemList:", hasExternItemList,
|
||||
"isUnsafe:", isUnsafe
|
||||
|
||||
7
rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCanonicalPath.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCanonicalPath.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ExternBlock x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getCanonicalPath()
|
||||
7
rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql
generated
Normal file
7
rust/ql/test/extractor-tests/generated/ExternBlock/ExternBlock_getCrateOrigin.ql
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from ExternBlock x
|
||||
where toBeTested(x) and not x.isUnknown()
|
||||
select x, x.getCrateOrigin()
|
||||
Reference in New Issue
Block a user