@@ -75,6 +75,7 @@ private import internal.AccessPaths
75
75
private import semmle.javascript.Unit
76
76
private import semmle.javascript.internal.CachedStages
77
77
private import AdditionalFlowSteps
78
+ private import internal.DataFlowPrivate as DataFlowPrivate
78
79
79
80
/**
80
81
* A data flow tracking configuration for finding inter-procedural paths from
@@ -1794,39 +1795,7 @@ deprecated class MidPathNode extends PathNode, MkMidNode {
1794
1795
* Holds if this node is hidden from paths in path explanation queries, except
1795
1796
* in cases where it is the source or sink.
1796
1797
*/
1797
- predicate isHidden ( ) { PathNode:: shouldNodeBeHidden ( nd ) }
1798
- }
1799
-
1800
- /** Companion module to the `PathNode` class. */
1801
- module PathNode {
1802
- /** Holds if `nd` should be hidden in data flow paths. */
1803
- predicate shouldNodeBeHidden ( DataFlow:: Node nd ) {
1804
- // TODO: move to DataFlowPrivate
1805
- // Skip phi, refinement, and capture nodes
1806
- nd .( DataFlow:: SsaDefinitionNode ) .getSsaVariable ( ) .getDefinition ( ) instanceof
1807
- SsaImplicitDefinition
1808
- or
1809
- // Skip SSA definition of parameter as its location coincides with the parameter node
1810
- nd = DataFlow:: ssaDefinitionNode ( Ssa:: definition ( any ( SimpleParameter p ) ) )
1811
- or
1812
- // Skip to the top of big left-leaning string concatenation trees.
1813
- nd = any ( AddExpr add ) .flow ( ) and
1814
- nd = any ( AddExpr add ) .getAnOperand ( ) .flow ( )
1815
- or
1816
- // Skip the exceptional return on functions, as this highlights the entire function.
1817
- nd = any ( DataFlow:: FunctionNode f ) .getExceptionalReturn ( )
1818
- or
1819
- // Skip the special return node for functions, as this highlights the entire function (and the returned expr is the previous node).
1820
- nd = any ( DataFlow:: FunctionNode f ) .getReturnNode ( )
1821
- or
1822
- // Skip the synthetic 'this' node, as a ThisExpr will be the next node anyway
1823
- nd = DataFlow:: thisNode ( _)
1824
- or
1825
- // Skip captured variable nodes as the successor will be a use of that variable anyway.
1826
- nd = DataFlow:: capturedVariableNode ( _)
1827
- or
1828
- nd instanceof DataFlow:: FunctionSelfReferenceNode
1829
- }
1798
+ predicate isHidden ( ) { DataFlowPrivate:: nodeIsHidden ( nd ) }
1830
1799
}
1831
1800
1832
1801
/**
0 commit comments