@@ -29,7 +29,7 @@ abstract class NodePublic extends TNode {
2929 /**
3030 * Gets the expression that corresponds to this node, if any.
3131 */
32- ExprCfgNode asExpr ( ) { none ( ) }
32+ final ExprCfgNode asExpr ( ) { this = TExprNode ( result ) }
3333
3434 /**
3535 * Gets the parameter that corresponds to this node, if any.
@@ -39,7 +39,7 @@ abstract class NodePublic extends TNode {
3939 /**
4040 * Gets the pattern that corresponds to this node, if any.
4141 */
42- PatCfgNode asPat ( ) { none ( ) }
42+ final PatCfgNode asPat ( ) { this = TPatNode ( result ) }
4343}
4444
4545abstract class Node extends NodePublic {
@@ -144,16 +144,12 @@ class ExprNode extends AstCfgFlowNode, TExprNode {
144144 override ExprCfgNode n ;
145145
146146 ExprNode ( ) { this = TExprNode ( n ) }
147-
148- override ExprCfgNode asExpr ( ) { result = n }
149147}
150148
151149final class PatNode extends AstCfgFlowNode , TPatNode {
152150 override PatCfgNode n ;
153151
154152 PatNode ( ) { this = TPatNode ( n ) }
155-
156- override PatCfgNode asPat ( ) { result = n }
157153}
158154
159155/** A data flow node that corresponds to a name node in the CFG. */
@@ -467,16 +463,13 @@ newtype TNode =
467463 or
468464 e =
469465 [
470- any ( IndexExprCfgNode i ) .getBase ( ) , any ( FieldExprCfgNode access ) .getExpr ( ) ,
471- any ( TryExprCfgNode try ) .getExpr ( ) ,
472- any ( PrefixExprCfgNode pe | pe .getOperatorName ( ) = "*" ) .getExpr ( ) ,
473- any ( AwaitExprCfgNode a ) .getExpr ( ) , any ( MethodCallExprCfgNode mc ) .getReceiver ( )
466+ any ( IndexExprCfgNode i ) .getBase ( ) , //
467+ any ( FieldExprCfgNode access ) .getExpr ( ) , //
468+ any ( TryExprCfgNode try ) .getExpr ( ) , //
469+ any ( PrefixExprCfgNode pe | pe .getOperatorName ( ) = "*" ) .getExpr ( ) , //
470+ any ( AwaitExprCfgNode a ) .getExpr ( ) , any ( MethodCallExprCfgNode mc ) .getReceiver ( ) , //
471+ getPostUpdateReverseStep ( any ( PostUpdateNode n ) .getPreUpdateNode ( ) .asExpr ( ) , _)
474472 ]
475- or
476- exists ( ExprCfgNode pred |
477- exists ( TExprPostUpdateNode ( pred ) ) and
478- e = getPostUpdateReverseStep ( pred , _)
479- )
480473 } or
481474 TReceiverNode ( MethodCallExprCfgNode mc , Boolean isPost ) or
482475 TSsaNode ( SsaImpl:: DataFlowIntegration:: SsaNode node ) or
0 commit comments