We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d08c0f7 commit 9a496e6Copy full SHA for 9a496e6
1 file changed
ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPrivate.qll
@@ -285,11 +285,17 @@ private module Cached {
285
// and we can remove this case.
286
n.asExpr().getExpr() instanceof Self
287
or
288
+ // Nodes that can't be reached from another parameter or expression.
289
not localFlowStepTypeTracker+(any(Node e |
290
e instanceof ExprNode
291
292
e instanceof ParameterNode
293
), n)
294
+ or
295
+ // Ensure all parameter SSA nodes are local sources -- this is needed by type tracking.
296
+ // Note that when the parameter has a default value, it will be reachable from an
297
+ // expression (the default value) and therefore won't be caught by the rule above.
298
+ n = LocalFlow::getParameterDefNode(_)
299
}
300
301
cached
0 commit comments