mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
JS: Downgrade the contract for getImmediatePredecessor
This commit is contained in:
@@ -165,9 +165,15 @@ module DataFlow {
|
||||
/**
|
||||
* Gets the immediate predecessor of this node, if any.
|
||||
*
|
||||
* A node with an immediate predecessor can only ever have the value that flows
|
||||
* into its from its immediate predecessor. It can be treated as an alias for
|
||||
* the immediate predecessor.
|
||||
* A node with an immediate predecessor can usually only have the value that flows
|
||||
* into its from its immediate predecessor, currently with two exceptions:
|
||||
*
|
||||
* - An immediately-invoked function expression with a single return expression `e`
|
||||
* has `e` as its immediate predecessor, even if the function can fall over the
|
||||
* end and return `undefined`.
|
||||
*
|
||||
* - A destructuring property pattern with a default value has both the `PropRead`
|
||||
* and its default value as immediate predecessors.
|
||||
*/
|
||||
cached
|
||||
DataFlow::Node getImmediatePredecessor() {
|
||||
|
||||
Reference in New Issue
Block a user