Rust: Address PR comments

This commit is contained in:
Simon Friis Vindum
2025-02-04 10:19:04 +01:00
parent fc15c0d3b2
commit 07413315a1
3 changed files with 6 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ module DataFlow {
* The value of a parameter at function entry, viewed as a node in a data
* flow graph.
*/
final class ParameterNode = Node::SourceParameterNode;
final class ParameterNode extends Node instanceof Node::SourceParameterNode { }
final class PostUpdateNode = Node::PostUpdateNodePublic;

View File

@@ -20,7 +20,9 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
Type getType() { any() }
Callable getEnclosingCallable() { result = super.getEnclosingCallable().asCfgScope() }
Callable getEnclosingCallable() {
result = this.(Node::Node).getEnclosingCallable().asCfgScope()
}
}
private predicate relevant(Function api) {
@@ -91,7 +93,7 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
}
Callable returnNodeEnclosingCallable(DataFlow::Node ret) {
result = ret.getEnclosingCallable().asCfgScope()
result = ret.(Node::Node).getEnclosingCallable().asCfgScope()
}
predicate isOwnInstanceAccessNode(RustDataFlow::ReturnNode node) {

View File

@@ -3,7 +3,7 @@ import utils.modelgenerator.internal.CaptureModels
import utils.test.InlineMadTest
module InlineMadTestConfig implements InlineMadTestConfigSig {
string getCapturedModel(Function c) { result = captureMixedFlow(c, _) }
string getCapturedModel(Function c) { result = ContentSensitive::captureFlow(c, _) }
string getKind() { result = "summary" }
}