mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
JS: Hide captured nodes in path explanations
This commit is contained in:
@@ -1462,6 +1462,9 @@ class MidPathNode extends PathNode, MkMidNode {
|
||||
or
|
||||
// Skip the synthetic 'this' node, as a ThisExpr will be the next node anyway
|
||||
nd = DataFlow::thisNode(_)
|
||||
or
|
||||
// Skip captured variable nodes as the successor will be a use of that variable anyway.
|
||||
nd = DataFlow::capturedVariableNode(_)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1245,6 +1245,15 @@ module DataFlow {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL. DO NOT USE.
|
||||
*
|
||||
* Gets a data flow node representing the given captured variable.
|
||||
*/
|
||||
Node capturedVariableNode(LocalVariable variable) {
|
||||
result = TCapturedVariableNode(variable)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the data flow node corresponding to `nd`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user