@@ -710,25 +710,28 @@ private module Cached {
710
710
TObjectInitializerNode ( ControlFlow:: Nodes:: ElementNode cfn ) {
711
711
cfn .getElement ( ) .( ObjectCreation ) .hasInitializer ( )
712
712
} or
713
- TExprPostUpdateNode ( ControlFlow:: Nodes:: ElementNode cfn ) {
714
- exists ( Argument a , Type t |
715
- a = cfn .getElement ( ) and
716
- t = a .stripCasts ( ) .getType ( )
717
- |
718
- t instanceof RefType and
719
- not t instanceof NullType
713
+ TExprPostUpdateNode ( ControlFlow:: Nodes:: ExprNode cfn ) {
714
+ exists ( Expr e | e = cfn .getExpr ( ) |
715
+ exists ( Type t | t = e .( Argument ) .stripCasts ( ) .getType ( ) |
716
+ t instanceof RefType and
717
+ not t instanceof NullType
718
+ or
719
+ t = any ( TypeParameter tp | not tp .isValueType ( ) )
720
+ )
720
721
or
721
- t = any ( TypeParameter tp | not tp .isValueType ( ) )
722
- )
723
- or
724
- fieldOrPropertyStore ( _, _, _, cfn .getElement ( ) , true )
725
- or
726
- arrayStore ( _, _, cfn .getElement ( ) , true )
727
- or
728
- exists ( TExprPostUpdateNode upd , FieldOrPropertyAccess fla |
729
- upd = TExprPostUpdateNode ( fla .getAControlFlowNode ( ) )
730
- |
731
- cfn .getElement ( ) = fla .getQualifier ( )
722
+ fieldOrPropertyStore ( _, _, _, e , true )
723
+ or
724
+ arrayStore ( _, _, e , true )
725
+ or
726
+ // needed for reverse stores; e.g. `x.f1.f2 = y` induces
727
+ // a store step of `f1` into `x`
728
+ exists ( TExprPostUpdateNode upd , Expr read |
729
+ upd = TExprPostUpdateNode ( read .getAControlFlowNode ( ) )
730
+ |
731
+ fieldOrPropertyRead ( e , _, read )
732
+ or
733
+ arrayRead ( e , read )
734
+ )
732
735
)
733
736
} or
734
737
TSummaryNode ( FlowSummary:: SummarizedCallable c , FlowSummaryImpl:: Private:: SummaryNodeState state ) {
0 commit comments