File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
java/ql/lib/semmle/code/java/dataflow Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -144,13 +144,14 @@ class SsaVariable extends Definition {
144144 SsaSourceVariable getSourceVariable ( ) { result = super .getSourceVariable ( ) }
145145
146146 /** Gets the `ControlFlowNode` at which this SSA variable is defined. */
147+ pragma [ nomagic]
147148 ControlFlowNode getCfgNode ( ) {
148149 exists ( BasicBlock bb , int i , int j |
149150 this .definesAt ( _, bb , i ) and
150151 // untracked definitions are inserted just before reads
151152 ( if this instanceof UntrackedDef then j = i + 1 else j = i ) and
152153 // phi nodes are inserted at position `-1`
153- result = bb .getNode ( max ( [ j , 0 ] ) )
154+ result = bb .getNode ( 0 . maximum ( j ) )
154155 )
155156 }
156157
Original file line number Diff line number Diff line change @@ -465,10 +465,16 @@ private module Cached {
465465 )
466466 }
467467
468+ bindingset [ call, f]
469+ pragma [ inline_late]
470+ private predicate updatesNamedField0 ( Call call , TrackedField f , Callable setter ) {
471+ updatesNamedField ( call , f , setter )
472+ }
473+
468474 cached
469475 predicate defUpdatesNamedField ( SsaImplicitUpdate def , TrackedField f , Callable setter ) {
470476 f = def .getSourceVariable ( ) and
471- updatesNamedField ( def .getCfgNode ( ) .asCall ( ) , f , setter )
477+ updatesNamedField0 ( def .getCfgNode ( ) .asCall ( ) , f , setter )
472478 }
473479
474480 cached
You can’t perform that action at this time.
0 commit comments