Python: fix identical-files.json after move

also more grouping
This commit is contained in:
Rasmus Lerchedahl Petersen
2020-06-17 07:08:46 +02:00
parent e192b66116
commit 47f5b04e87
2 changed files with 24 additions and 23 deletions

View File

@@ -9,22 +9,6 @@ private import DataFlowPublic
// Nodes
//--------
class DataFlowCall extends CallNode {
/** Gets the enclosing callable of this call. */
abstract DataFlowCallable getEnclosingCallable();
}
/** A data flow node that represents a call argument. */
abstract class ArgumentNode extends Node {
/** Holds if this argument occurs at the given position in the given call. */
cached
abstract predicate argumentOf(DataFlowCall call, int pos);
/** Gets the call in which this node is an argument. */
final DataFlowCall getCall() { this.argumentOf(result, _) }
}
/**
* A node associated with an object after an operation that might have
* changed its state.
@@ -103,10 +87,27 @@ predicate simpleLocalFlowStep(Node nodeFrom, Node nodeTo) {
// Global flow
//--------
import semmle.python.pointsto.CallGraph
/** Represents a callable */
class DataFlowCallable = FunctionObject;
/** Represents a call to a callable */
class DataFlowCall extends CallNode {
/** Gets the enclosing callable of this call. */
abstract DataFlowCallable getEnclosingCallable();
}
/** A data flow node that represents a call argument. */
abstract class ArgumentNode extends Node {
/** Holds if this argument occurs at the given position in the given call. */
cached
abstract predicate argumentOf(DataFlowCall call, int pos);
/** Gets the call in which this node is an argument. */
final DataFlowCall getCall() { this.argumentOf(result, _) }
}
import semmle.python.pointsto.CallGraph
/** Gets a viable run-time target for the call `call`. */
DataFlowCallable viableCallable(DataFlowCall call) {
exists(FunctionInvocation i |