@@ -89,18 +89,13 @@ class CfgScope extends Element, @top_level_exprorstmt_parent {
8989
9090private class TAstNode = @callable or @control_flow_element;
9191
92- private Element getAChild ( Element p ) {
93- result = p .getAChild ( ) or
94- result = p .( AssignOperation ) .getExpandedAssignment ( )
95- }
96-
9792pragma [ nomagic]
9893private predicate astNode ( Element e ) {
9994 e = any ( @top_level_exprorstmt_parent p | not p instanceof Attribute )
10095 or
10196 exists ( Element parent |
10297 astNode ( parent ) and
103- e = getAChild ( parent )
98+ e = parent . getAChild ( )
10499 )
105100}
106101
@@ -521,7 +516,6 @@ module Expressions {
521516 not this instanceof LogicalOrExpr and
522517 not this instanceof NullCoalescingExpr and
523518 not this instanceof ConditionalExpr and
524- not this instanceof AssignOperationWithExpandedAssignment and
525519 not this instanceof ConditionallyQualifiedExpr and
526520 not this instanceof ThrowExpr and
527521 not this instanceof ObjectCreation and
@@ -619,7 +613,7 @@ module Expressions {
619613 def .getExpr ( ) = this and
620614 def .getTargetAccess ( ) .( WriteAccess ) instanceof QualifiableExpr and
621615 not def instanceof AssignableDefinitions:: OutRefDefinition and
622- not this instanceof AssignOperationWithExpandedAssignment
616+ not def instanceof AssignableDefinitions :: AssignOperationDefinition
623617 }
624618
625619 /**
@@ -802,26 +796,6 @@ module Expressions {
802796 }
803797 }
804798
805- /**
806- * An assignment operation that has an expanded version. We use the expanded
807- * version in the control flow graph in order to get better data flow / taint
808- * tracking.
809- */
810- private class AssignOperationWithExpandedAssignment extends ControlFlowTree instanceof AssignOperation
811- {
812- private Expr expanded ;
813-
814- AssignOperationWithExpandedAssignment ( ) { expanded = this .getExpandedAssignment ( ) }
815-
816- final override predicate first ( AstNode first ) { first ( expanded , first ) }
817-
818- final override predicate last ( AstNode last , Completion c ) { last ( expanded , last , c ) }
819-
820- final override predicate propagatesAbnormal ( AstNode child ) { none ( ) }
821-
822- final override predicate succ ( AstNode pred , AstNode succ , Completion c ) { none ( ) }
823- }
824-
825799 /** A conditionally qualified expression. */
826800 private class ConditionallyQualifiedExpr extends PostOrderTree instanceof QualifiableExpr {
827801 private Expr qualifier ;
@@ -1579,7 +1553,7 @@ module Statements {
15791553 /** Gets a child of `cfe` that is in CFG scope `scope`. */
15801554 pragma [ noinline]
15811555 private ControlFlowElement getAChildInScope ( AstNode cfe , Callable scope ) {
1582- result = getAChild ( cfe ) and
1556+ result = cfe . getAChild ( ) and
15831557 scope = result .getEnclosingCallable ( )
15841558 }
15851559
0 commit comments