We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
refReadBeforeWrite
1 parent 1739673 commit 1d654d1Copy full SHA for 1d654d1
csharp/ql/lib/semmle/code/csharp/dataflow/internal/SsaImpl.qll
@@ -171,7 +171,8 @@ private module SourceVariableImpl {
171
def.getTarget() = lv and
172
lv.isRef() and
173
lv = v.getAssignable() and
174
- bb.getNode(i) = def.getAControlFlowNode()
+ bb.getNode(i) = def.getAControlFlowNode() and
175
+ not def.getAssignment() instanceof LocalVariableDeclAndInitExpr
176
)
177
}
178
0 commit comments