mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
JS: Make getAFunctionValue follow global access paths
This commit is contained in:
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user