JS: Make getAFunctionValue follow global access paths

This commit is contained in:
Asger F
2019-08-07 10:32:38 +01:00
parent 8d59df229a
commit b1f9db9145

View File

@@ -121,6 +121,12 @@ module DataFlow {
/** Gets a function value that may reach this node. */
FunctionNode getAFunctionValue() {
result.getAstNode() = analyze().getAValue().(AbstractCallable).getFunction()
or
exists(string name |
GlobalAccessPath::isAssignedInUniqueFile(name) and
GlobalAccessPath::fromRhs(result) = name and
GlobalAccessPath::fromReference(this) = name
)
}
/**