mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
Rust: Run codegen
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
query predicate instances(MacroBlockExpr x) { toBeTested(x) and not x.isUnknown() }
|
||||
|
||||
query predicate getStatement(MacroBlockExpr x, int index, Stmt getStatement) {
|
||||
toBeTested(x) and not x.isUnknown() and getStatement = x.getStatement(index)
|
||||
}
|
||||
|
||||
query predicate getTailExpr(MacroBlockExpr x, Expr getTailExpr) {
|
||||
toBeTested(x) and not x.isUnknown() and getTailExpr = x.getTailExpr()
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// generated by codegen, do not edit
|
||||
|
||||
fn test_macro_block_expr() -> () {
|
||||
// A sequence of statements generated by a `MacroCall`. For example:
|
||||
macro_rules! my_macro {
|
||||
() => {
|
||||
let mut x = 40;
|
||||
x += 2;
|
||||
x
|
||||
};
|
||||
}
|
||||
|
||||
my_macro!(); // this macro expands to a sequence of statements (and an expression)
|
||||
}
|
||||
Reference in New Issue
Block a user