mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: Address PR comments
This commit is contained in:
@@ -19,7 +19,7 @@ module DataFlow {
|
|||||||
* The value of a parameter at function entry, viewed as a node in a data
|
* The value of a parameter at function entry, viewed as a node in a data
|
||||||
* flow graph.
|
* flow graph.
|
||||||
*/
|
*/
|
||||||
final class ParameterNode = Node::SourceParameterNode;
|
final class ParameterNode extends Node instanceof Node::SourceParameterNode { }
|
||||||
|
|
||||||
final class PostUpdateNode = Node::PostUpdateNodePublic;
|
final class PostUpdateNode = Node::PostUpdateNodePublic;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
|
|||||||
|
|
||||||
Type getType() { any() }
|
Type getType() { any() }
|
||||||
|
|
||||||
Callable getEnclosingCallable() { result = super.getEnclosingCallable().asCfgScope() }
|
Callable getEnclosingCallable() {
|
||||||
|
result = this.(Node::Node).getEnclosingCallable().asCfgScope()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private predicate relevant(Function api) {
|
private predicate relevant(Function api) {
|
||||||
@@ -91,7 +93,7 @@ module ModelGeneratorInput implements ModelGeneratorInputSig<Location, RustDataF
|
|||||||
}
|
}
|
||||||
|
|
||||||
Callable returnNodeEnclosingCallable(DataFlow::Node ret) {
|
Callable returnNodeEnclosingCallable(DataFlow::Node ret) {
|
||||||
result = ret.getEnclosingCallable().asCfgScope()
|
result = ret.(Node::Node).getEnclosingCallable().asCfgScope()
|
||||||
}
|
}
|
||||||
|
|
||||||
predicate isOwnInstanceAccessNode(RustDataFlow::ReturnNode node) {
|
predicate isOwnInstanceAccessNode(RustDataFlow::ReturnNode node) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import utils.modelgenerator.internal.CaptureModels
|
|||||||
import utils.test.InlineMadTest
|
import utils.test.InlineMadTest
|
||||||
|
|
||||||
module InlineMadTestConfig implements InlineMadTestConfigSig {
|
module InlineMadTestConfig implements InlineMadTestConfigSig {
|
||||||
string getCapturedModel(Function c) { result = captureMixedFlow(c, _) }
|
string getCapturedModel(Function c) { result = ContentSensitive::captureFlow(c, _) }
|
||||||
|
|
||||||
string getKind() { result = "summary" }
|
string getKind() { result = "summary" }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user