File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
cpp/ql/src/semmle/code/cpp/dataflow/internal Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -237,15 +237,8 @@ module FlowVar_internal {
237237
238238 override VariableAccess getAnAccess ( ) {
239239 exists ( SubBasicBlock reached |
240- reached = getAReachedBlockVarSBB ( this )
241- |
240+ reached = getAReachedBlockVarSBB ( this ) and
242241 variableAccessInSBB ( v , reached , result )
243- or
244- // Allow flow into a `VariableAccess` that is used as definition by
245- // reference. This flow is blocked by `getAReachedBlockVarSBB` because
246- // flow should not propagate past that.
247- result = reached .getASuccessor ( ) .( VariableAccess ) and
248- blockVarDefinedByReference ( result , v , _)
249242 )
250243 }
251244
@@ -420,6 +413,12 @@ module FlowVar_internal {
420413 va .getTarget ( ) = v and
421414 va = sbb .getANode ( ) and
422415 not overwrite ( va , _)
416+ or
417+ // Allow flow into a `VariableAccess` that is used as definition by
418+ // reference. This flow is blocked by `getAReachedBlockVarSBB` because
419+ // flow should not propagate past that.
420+ va = sbb .getASuccessor ( ) .( VariableAccess ) and
421+ blockVarDefinedByReference ( va , v , _)
423422 }
424423
425424 /**
You can’t perform that action at this time.
0 commit comments