Skip to content

Commit

Permalink
C#: Restrict refReadBeforeWrite
Browse files Browse the repository at this point in the history
  • Loading branch information
hvitved committed Nov 24, 2021
1 parent 1739673 commit 1d654d1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ private module SourceVariableImpl {
def.getTarget() = lv and
lv.isRef() and
lv = v.getAssignable() and
bb.getNode(i) = def.getAControlFlowNode()
bb.getNode(i) = def.getAControlFlowNode() and
not def.getAssignment() instanceof LocalVariableDeclAndInitExpr
)
}

Expand Down

0 comments on commit 1d654d1

Please sign in to comment.