Skip to content

Commit 7bd7bed

Browse files
committed
Ruby: Simplify isLocalSourceNode implementation
The need for `SynthReturnNode` goes away if we don't restrict the nodes that can't be reached from another entry definition or expression to be `ExprNode`s
1 parent a7b43f7 commit 7bd7bed

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,7 @@ private module Cached {
302302
or
303303
n instanceof PostUpdateNodes::ExprPostUpdateNode
304304
or
305-
// TODO: Explain why SynthReturnNode is needed!
306-
// if we don't include this, we are not able to find this call:
307-
// https://github.com/github/codeql/blob/976daddd36a63bf46836d141d04172e90bb4b33c/ruby/ql/test/library-tests/frameworks/http_clients/NetHttp.rb#L24
308-
n instanceof SynthReturnNode
309-
or
310-
// Expressions that can't be reached from another entry definition or expression.
311-
n instanceof ExprNode and
305+
// Nodes that can't be reached from another entry definition or expression.
312306
not localFlowStepTypeTracker+(any(Node n0 |
313307
n0 instanceof ExprNode
314308
or

0 commit comments

Comments
 (0)