mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Rust: Fixup MaD input.
This commit is contained in:
@@ -20,15 +20,17 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
|
||||
class Callable = R::Callable;
|
||||
|
||||
class NodeExtended extends DataFlow::Node {
|
||||
Callable getAsExprEnclosingCallable() { result = this.asExpr().getScope() }
|
||||
|
||||
Type getType() { any() }
|
||||
|
||||
Callable getEnclosingCallable() {
|
||||
result = this.(Node::Node).getEnclosingCallable().asCfgScope()
|
||||
}
|
||||
}
|
||||
|
||||
Callable getAsExprEnclosingCallable(NodeExtended node) { result = node.asExpr().getScope() }
|
||||
|
||||
Callable getEnclosingCallable(NodeExtended node) {
|
||||
result = node.(Node::Node).getEnclosingCallable().asCfgScope()
|
||||
}
|
||||
|
||||
Parameter asParameter(NodeExtended node) { result = node.asParameter() }
|
||||
|
||||
private predicate relevant(Function api) {
|
||||
// Only include functions that have a resolved path.
|
||||
api.hasCrateOrigin() and
|
||||
|
||||
Reference in New Issue
Block a user