Skip to content

Commit 1b68a4f

Browse files
committed
C#: Adjust tuple data flow to the new assignable definition.
1 parent 189a713 commit 1b68a4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,8 +2475,8 @@ private class ReadStepConfiguration extends ControlFlowReachabilityConfiguration
24752475
)
24762476
or
24772477
scope =
2478-
any(TupleExpr te |
2479-
te.getAnArgument() = defTo.(AssignableDefinitions::LocalVariableDefinition).getDeclaration() and
2478+
any(TuplePatternExpr te |
2479+
te.getAnArgument() = defTo.(AssignableDefinitions::PatternDefinition).getDeclaration() and
24802480
e = te and
24812481
exactScope = false and
24822482
isSuccessor = false
@@ -2525,8 +2525,8 @@ private predicate readContentStep(Node node1, Content c, Node node2) {
25252525
)
25262526
or
25272527
// item = variable in node1 = (..., variable, ...) in a case/is var (..., ...)
2528-
te = any(PatternExpr pe).getAChildExpr*() and
2529-
exists(AssignableDefinitions::LocalVariableDefinition lvd |
2528+
te = any(TuplePatternExpr pe).getAChildExpr*() and
2529+
exists(AssignableDefinitions::PatternDefinition lvd |
25302530
node2.(AssignableDefinitionNode).getDefinition() = lvd and
25312531
lvd.getDeclaration() = item and
25322532
hasNodePath(x, node1, node2)

0 commit comments

Comments
 (0)