mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: move things around
This commit is contained in:
@@ -388,7 +388,10 @@ module LocalFlow {
|
|||||||
module VariableCapture {
|
module VariableCapture {
|
||||||
private import codeql.dataflow.VariableCapture as Shared
|
private import codeql.dataflow.VariableCapture as Shared
|
||||||
|
|
||||||
class ExprCfgNode extends ControlFlowNode {
|
private module CaptureInput implements Shared::InputSig<Location> {
|
||||||
|
private import python as PY
|
||||||
|
|
||||||
|
additional class ExprCfgNode extends ControlFlowNode {
|
||||||
ExprCfgNode() { isExpressionNode(this) }
|
ExprCfgNode() { isExpressionNode(this) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,8 +405,9 @@ module VariableCapture {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private module CaptureInput implements Shared::InputSig<Location> {
|
class Callable extends Scope {
|
||||||
private import python as PY
|
predicate isConstructor() { none() }
|
||||||
|
}
|
||||||
|
|
||||||
class BasicBlock extends PY::BasicBlock {
|
class BasicBlock extends PY::BasicBlock {
|
||||||
Callable getEnclosingCallable() { result = this.getScope() }
|
Callable getEnclosingCallable() { result = this.getScope() }
|
||||||
@@ -482,10 +486,6 @@ module VariableCapture {
|
|||||||
|
|
||||||
predicate hasAliasedAccess(Expr f) { closureFlowStep+(this, f) and not closureFlowStep(f, _) }
|
predicate hasAliasedAccess(Expr f) { closureFlowStep+(this, f) and not closureFlowStep(f, _) }
|
||||||
}
|
}
|
||||||
|
|
||||||
class Callable extends Scope {
|
|
||||||
predicate isConstructor() { none() }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class CapturedVariable = CaptureInput::CapturedVariable;
|
class CapturedVariable = CaptureInput::CapturedVariable;
|
||||||
|
|||||||
Reference in New Issue
Block a user