Skip to content

Commit 25adcfc

Browse files
committed
C#: Fix missing phi flow
1 parent e092b31 commit 25adcfc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowPrivate.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ module LocalFlow {
292292
*/
293293
private predicate localFlowSsaInput(Node nodeFrom, Ssa::Definition def, Ssa::Definition next) {
294294
exists(ControlFlow::BasicBlock bb, int i | SsaImpl::lastRefBeforeRedef(def, bb, i, next) |
295-
def = nodeFrom.(SsaDefinitionNode).getDefinition() and
296-
def.definesAt(_, bb, i)
295+
def.definesAt(_, bb, i) and
296+
def = getSsaDefinition(nodeFrom)
297297
or
298298
nodeFrom.asExprAtNode(bb.getNode(i)) instanceof AssignableRead
299299
)

csharp/ql/test/library-tests/dataflow/delegates/DelegateFlow.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ delegateCall
2525
| DelegateFlow.cs:89:35:89:37 | delegate call | DelegateFlow.cs:74:17:74:19 | M12 | DelegateFlow.cs:92:13:92:15 | delegate creation of type MyDelegate |
2626
| DelegateFlow.cs:89:35:89:37 | delegate call | DelegateFlow.cs:93:13:93:21 | (...) => ... | DelegateFlow.cs:93:13:93:21 | (...) => ... |
2727
| DelegateFlow.cs:132:9:132:11 | delegate call | DelegateFlow.cs:131:17:131:24 | (...) => ... | file://:0:0:0:0 | <empty> |
28+
| DelegateFlow.cs:132:9:132:11 | delegate call | DelegateFlow.cs:135:29:135:36 | (...) => ... | DelegateFlow.cs:135:29:135:36 | (...) => ... |

0 commit comments

Comments
 (0)