Rename getCallable to getTarget

This commit is contained in:
Nick Rolfe
2021-04-30 14:41:50 +01:00
parent 300a54384f
commit 37c8d8a252
2 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ class DataFlowCallable = CfgScope;
class DataFlowCall extends CfgNodes::ExprNodes::CallCfgNode {
DataFlowCallable getEnclosingCallable() { result = this.getScope() }
DataFlowCallable getCallable() {
DataFlowCallable getTarget() {
// TODO: this is a placeholder that finds a method with the same name, iff it's uniquely named.
result =
unique(DataFlowCallable c | c.(Method).getName() = this.getNode().(MethodCall).getMethodName())

View File

@@ -24,7 +24,7 @@ predicate callStep(
DataFlowPrivate::ArgumentNode nodeFrom, DataFlowPrivate::ExplicitParameterNode nodeTo
) {
exists(DataFlowDispatch::DataFlowCall call, DataFlowDispatch::DataFlowCallable callable, int i |
call.getCallable() = callable and
call.getTarget() = callable and
nodeFrom.argumentOf(call, i) and
nodeTo.isParameterOf(callable, i)
)
@@ -33,7 +33,7 @@ predicate callStep(
/** Holds if `nodeFrom` steps to `nodeTo` by being returned from a call. */
predicate returnStep(DataFlowPrivate::ReturnNode nodeFrom, Node nodeTo) {
exists(DataFlowDispatch::DataFlowCall call |
nodeFrom.getEnclosingCallable() = call.getCallable() and
nodeFrom.getEnclosingCallable() = call.getTarget() and
nodeTo.asExpr().getNode() = call.getNode()
)
}