File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
java/ql/lib/semmle/code/java/dataflow Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -228,9 +228,10 @@ class SsaImplicitUpdate extends SsaUpdate {
228228 }
229229
230230 private predicate hasExplicitQualifierUpdate ( ) {
231- exists ( SsaExplicitUpdate qdef , BasicBlock bb , int i |
231+ exists ( SsaUpdate qdef , BasicBlock bb , int i |
232232 qdef .definesAt ( this .getSourceVariable ( ) .getQualifier ( ) , bb , i ) and
233- this .definesAt ( _, bb , i )
233+ this .definesAt ( _, bb , i ) and
234+ not qdef instanceof SsaUncertainImplicitUpdate
234235 )
235236 }
236237
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ private module TrackedVariablesImpl {
4444 }
4545
4646 /** Holds if `f` is accessed more than once or inside a loop. */
47- predicate multiAccessed ( SsaSourceField f ) { loopAccessed ( f ) or 1 < numberOfAccesses ( f ) }
47+ private predicate multiAccessed ( SsaSourceField f ) { loopAccessed ( f ) or 1 < numberOfAccesses ( f ) }
4848
4949 /**
5050 * Holds if `f` is a field that is interesting as a basis for SSA.
@@ -619,13 +619,12 @@ private module Cached {
619619 useReaches ( use , mid , sameVarMid ) and
620620 DataFlowIntegration:: localFlowStep ( _, mid , node , _)
621621 |
622- // flow into phi input node
623- mid instanceof DataFlowIntegration:: SsaInputNode and
624- sameVar = false
625- or
626- // flow into definition
627622 exists ( Impl:: DefinitionExt def |
623+ // flow into definition
628624 def = mid .( DataFlowIntegration:: SsaDefinitionExtNode ) .getDefinitionExt ( )
625+ or
626+ // flow into phi input node
627+ def = mid .( DataFlowIntegration:: SsaInputNode ) .getDefinitionExt ( )
629628 |
630629 if def instanceof Impl:: PhiReadNode then sameVar = sameVarMid else sameVar = false
631630 )
You can’t perform that action at this time.
0 commit comments