Ruby: Hide more SSA nodes from data-flow path explanations

This commit is contained in:
Tom Hvitved
2022-02-08 11:27:22 +01:00
parent 1eba8277ee
commit 0bd8411cb6
2 changed files with 7 additions and 7 deletions

View File

@@ -320,9 +320,13 @@ import Cached
/** Holds if `n` should be hidden from path explanations. */
predicate nodeIsHidden(Node n) {
exists(Ssa::Definition def | def = n.(SsaDefinitionNode).getDefinition() |
def instanceof Ssa::PhiNode
def instanceof Ssa::PhiNode or
def instanceof Ssa::CapturedEntryDefinition or
def instanceof Ssa::CapturedCallDefinition
)
or
n = LocalFlow::getParameterDefNode(_)
or
isDesugarNode(n.(ExprNode).getExprNode().getExpr())
or
n instanceof SummaryNode

View File

@@ -734,14 +734,12 @@ edges
| array_flow.rb:399:10:399:10 | b [array element 2] : | array_flow.rb:399:10:399:13 | ...[...] |
| array_flow.rb:403:16:403:25 | call to source : | array_flow.rb:404:18:404:18 | a [array element 2] : |
| array_flow.rb:403:16:403:25 | call to source : | array_flow.rb:404:18:404:18 | a [array element 2] : |
| array_flow.rb:404:9:406:7 | ... = ... : | array_flow.rb:404:9:406:7 | call to each : |
| array_flow.rb:404:9:406:7 | ... = ... : | array_flow.rb:404:9:406:7 | call to each : |
| array_flow.rb:404:9:406:7 | ... = ... : | array_flow.rb:407:10:407:10 | x |
| array_flow.rb:404:9:406:7 | ... = ... : | array_flow.rb:407:10:407:10 | x |
| array_flow.rb:404:9:406:7 | __synth__0__1 : | array_flow.rb:404:9:406:7 | ... = ... : |
| array_flow.rb:404:9:406:7 | __synth__0__1 : | array_flow.rb:404:9:406:7 | ... = ... : |
| array_flow.rb:404:9:406:7 | __synth__0__1 : | array_flow.rb:405:14:405:14 | x |
| array_flow.rb:404:9:406:7 | __synth__0__1 : | array_flow.rb:405:14:405:14 | x |
| array_flow.rb:404:9:406:7 | call to each : | array_flow.rb:407:10:407:10 | x |
| array_flow.rb:404:9:406:7 | call to each : | array_flow.rb:407:10:407:10 | x |
| array_flow.rb:404:18:404:18 | a [array element 2] : | array_flow.rb:404:9:406:7 | __synth__0__1 : |
| array_flow.rb:404:18:404:18 | a [array element 2] : | array_flow.rb:404:9:406:7 | __synth__0__1 : |
| array_flow.rb:404:18:404:18 | a [array element 2] : | array_flow.rb:408:10:408:10 | b [array element 2] : |
@@ -4225,8 +4223,6 @@ nodes
| array_flow.rb:404:9:406:7 | ... = ... : | semmle.label | ... = ... : |
| array_flow.rb:404:9:406:7 | __synth__0__1 : | semmle.label | __synth__0__1 : |
| array_flow.rb:404:9:406:7 | __synth__0__1 : | semmle.label | __synth__0__1 : |
| array_flow.rb:404:9:406:7 | call to each : | semmle.label | call to each : |
| array_flow.rb:404:9:406:7 | call to each : | semmle.label | call to each : |
| array_flow.rb:404:18:404:18 | a [array element 2] : | semmle.label | a [array element 2] : |
| array_flow.rb:404:18:404:18 | a [array element 2] : | semmle.label | a [array element 2] : |
| array_flow.rb:405:14:405:14 | x | semmle.label | x |