mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
JavaScript: Introduce PathNode::wraps.
This commit is contained in:
@@ -889,9 +889,9 @@ private predicate flowsTo(
|
||||
PathNode flowsource, DataFlow::Node source, SinkPathNode flowsink, DataFlow::Node sink,
|
||||
DataFlow::Configuration cfg
|
||||
) {
|
||||
flowsource = MkPathNode(source, cfg, _) and
|
||||
flowsource.wraps(source, cfg) and
|
||||
flowsink = flowsource.getASuccessor*() and
|
||||
flowsink = MkPathNode(sink, id(cfg), _)
|
||||
flowsink.wraps(sink, id(cfg))
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -980,6 +980,11 @@ class PathNode extends TPathNode {
|
||||
/** Gets the summary of the path underlying this path node. */
|
||||
PathSummary getPathSummary() { result = summary }
|
||||
|
||||
/** Holds if this path node wraps data-flow node `nd` and configuration `c`. */
|
||||
predicate wraps(DataFlow::Node n, DataFlow::Configuration c) {
|
||||
nd = n and cfg = c
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a successor node of this path node, including hidden nodes.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user