JavaScript: Introduce PathNode::wraps.

This commit is contained in:
Max Schaefer
2019-10-18 16:52:49 +01:00
parent 98e0932de5
commit d71faaa5f9

View File

@@ -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.
*/