@@ -521,16 +521,15 @@ private predicate methodReturningReceiver(MemberFunction method) {
521521Function resolveCall ( Call call ) {
522522 result = call .getTarget ( )
523523 or
524- result = unresolveElement ( call ) .( DataSensitiveCallExpr ) .resolve ( )
524+ result = call .( DataSensitiveCallExpr ) .resolve ( )
525525}
526526
527527/** A data sensitive call expression. */
528- library abstract class DataSensitiveCallExpr extends @expr {
529- DataSensitiveCallExpr ( ) { not unreachable ( mkElement ( this ) ) }
528+ library abstract class DataSensitiveCallExpr extends Expr {
529+ DataSensitiveCallExpr ( ) { not unreachable ( this ) }
530530
531531 abstract Expr getSrc ( ) ;
532532 cached abstract Function resolve ( ) ;
533- abstract string toString ( ) ;
534533
535534 /**
536535 * Whether `src` can flow to this call expression.
@@ -556,39 +555,31 @@ library abstract class DataSensitiveCallExpr extends @expr {
556555}
557556
558557/** Call through a function pointer. */
559- library class DataSensitiveExprCall extends DataSensitiveCallExpr {
560- DataSensitiveExprCall ( ) {
561- mkElement ( this ) instanceof ExprCall
562- }
563-
564- override Expr getSrc ( ) { result = mkElement ( this ) .( ExprCall ) .getExpr ( ) }
558+ library class DataSensitiveExprCall extends DataSensitiveCallExpr , ExprCall {
559+ override Expr getSrc ( ) { result = getExpr ( ) }
565560
566561 override Function resolve ( ) {
567562 exists ( FunctionAccess fa | flowsFrom ( fa , true ) | result = fa .getTarget ( ) )
568563 }
569-
570- override string toString ( ) { result = mkElement ( this ) .toString ( ) }
571564}
572565
573566/** Call to a virtual function. */
574- library class DataSensitiveOverriddenFunctionCall extends DataSensitiveCallExpr {
567+ library class DataSensitiveOverriddenFunctionCall extends DataSensitiveCallExpr , FunctionCall {
575568 DataSensitiveOverriddenFunctionCall ( ) {
576- exists ( mkElement ( this ) . ( FunctionCall ) . getTarget ( ) .( VirtualFunction ) .getAnOverridingFunction ( ) )
569+ exists ( getTarget ( ) .( VirtualFunction ) .getAnOverridingFunction ( ) )
577570 }
578571
579- override Expr getSrc ( ) { result = mkElement ( this ) . ( FunctionCall ) . getQualifier ( ) }
572+ override Expr getSrc ( ) { result = getQualifier ( ) }
580573
581574 override MemberFunction resolve ( ) {
582575 exists ( NewExpr new |
583576 flowsFrom ( new , true )
584577 and
585578 memberFunctionFromNewExpr ( new , result )
586579 and
587- result .overrides * ( mkElement ( this ) . ( FunctionCall ) . getTarget ( ) .( VirtualFunction ) )
580+ result .overrides * ( getTarget ( ) .( VirtualFunction ) )
588581 )
589582 }
590-
591- override string toString ( ) { result = mkElement ( this ) .toString ( ) }
592583}
593584
594585private predicate memberFunctionFromNewExpr ( NewExpr new , MemberFunction f ) {
0 commit comments