File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -1588,4 +1588,9 @@ module IR {
15881588 * in a field/method access, element access, or slice expression.
15891589 */
15901590 EvalImplicitDerefInstruction implicitDerefInstruction ( Expr e ) { result = MkImplicitDeref ( e ) }
1591+
1592+ /** Gets the base of `insn`, if `insn` is an implicit field read. */
1593+ Instruction lookThroughImplicitFieldRead ( Instruction insn ) {
1594+ result = insn .( ImplicitFieldReadInstruction ) .getBaseInstruction ( )
1595+ }
15911596}
Original file line number Diff line number Diff line change @@ -384,17 +384,13 @@ module SourceSinkInterpretationInput implements
384384 }
385385
386386 private DataFlow:: Node skipImplicitFieldReads ( DataFlow:: Node n ) {
387- not exists ( lookThroughImplicitFieldRead ( n ) ) and result = n
387+ not exists ( IR :: lookThroughImplicitFieldRead ( n . asInstruction ( ) ) ) and result = n
388388 or
389- result = skipImplicitFieldReads ( lookThroughImplicitFieldRead ( n ) )
390- }
391-
392- private DataFlow:: Node lookThroughImplicitFieldRead ( DataFlow:: Node n ) {
393- result .asInstruction ( ) =
394- n .( DataFlow:: InstructionNode )
395- .asInstruction ( )
396- .( IR:: ImplicitFieldReadInstruction )
397- .getBaseInstruction ( )
389+ exists ( DataFlow:: Node mid |
390+ mid .asInstruction ( ) = IR:: lookThroughImplicitFieldRead ( n .asInstruction ( ) )
391+ |
392+ result = skipImplicitFieldReads ( mid )
393+ )
398394 }
399395
400396 /** Provides additional sink specification logic. */
You can’t perform that action at this time.
0 commit comments