mirror of
https://github.com/github/codeql.git
synced 2026-03-24 00:16:49 +01:00
JavaScript: Add predicate DataFlow::Node.getTopLevel().
This commit is contained in:
@@ -88,6 +88,9 @@ module DataFlow {
|
||||
/** Gets the container in which this node occurs. */
|
||||
StmtContainer getContainer() { result = getBasicBlock().getContainer() }
|
||||
|
||||
/** Gets the toplevel in which this node occurs. */
|
||||
TopLevel getTopLevel() { result = getContainer().getTopLevel() }
|
||||
|
||||
/**
|
||||
* Holds if this data flow node accesses the global variable `g`, either directly
|
||||
* or through the `window` object.
|
||||
|
||||
Reference in New Issue
Block a user