Merge pull request #12633 from erik-krogh/more-global-flow

JS: better callgraph support for global variables
This commit is contained in:
Erik Krogh Kristensen
2023-03-28 15:19:50 +02:00
committed by GitHub
7 changed files with 45 additions and 0 deletions

View File

@@ -243,6 +243,11 @@ module AccessPath {
root.isGlobal()
)
or
exists(Assignment assign |
fromReference(assign.getLhs().flow(), root) = result and
node = assign.getRhs().flow()
)
or
exists(FunctionDeclStmt fun |
node = DataFlow::valueNode(fun) and
result = fun.getIdentifier().(GlobalVarDecl).getName() and