mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
Python: Write DataFlow::update more succinctly
This has no impact on performance, but it cleans up the code a bit, and (hopefully) makes it more readable.
This commit is contained in:
@@ -215,10 +215,7 @@ private predicate localEssaStep(EssaNode nodeFrom, EssaNode nodeTo) {
|
||||
* Holds if `result` is either `node`, or the post-update node for `node`.
|
||||
*/
|
||||
private Node update(Node node) {
|
||||
exists(PostUpdateNode pun |
|
||||
node = pun.getPreUpdateNode() and
|
||||
result = pun
|
||||
)
|
||||
node = result.(PostUpdateNode).getPreUpdateNode()
|
||||
or
|
||||
result = node
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user