@@ -339,7 +339,7 @@ class FunctionNode extends DataFlow::ValueNode, DataFlow::SourceNode {
339339 int getNumParameter ( ) { result = count ( astNode .getAParameter ( ) ) }
340340
341341 /** Gets the last parameter of this function. */
342- ParameterNode getLastParameter ( ) { result = getParameter ( getNumParameter ( ) - 1 ) }
342+ ParameterNode getLastParameter ( ) { result = getParameter ( getNumParameter ( ) - 1 ) }
343343
344344 /** Holds if the last parameter of this function is a rest parameter. */
345345 predicate hasRestParameter ( ) { astNode .hasRestParameter ( ) }
@@ -650,16 +650,12 @@ class ClassNode extends DataFlow::SourceNode {
650650 /**
651651 * Gets a direct super class of this class.
652652 */
653- ClassNode getADirectSuperClass ( ) {
654- result .getAClassReference ( ) .flowsTo ( getASuperClassNode ( ) )
655- }
653+ ClassNode getADirectSuperClass ( ) { result .getAClassReference ( ) .flowsTo ( getASuperClassNode ( ) ) }
656654
657655 /**
658656 * Gets a direct subclass of this class.
659657 */
660- final ClassNode getADirectSubClass ( ) {
661- this = result .getADirectSuperClass ( )
662- }
658+ final ClassNode getADirectSubClass ( ) { this = result .getADirectSuperClass ( ) }
663659
664660 /**
665661 * Gets the receiver of an instance member or constructor of this class.
@@ -673,16 +669,12 @@ class ClassNode extends DataFlow::SourceNode {
673669 /**
674670 * Gets the abstract value representing the class itself.
675671 */
676- AbstractValue getAbstractClassValue ( ) {
677- result = this .( AnalyzedNode ) .getAValue ( )
678- }
672+ AbstractValue getAbstractClassValue ( ) { result = this .( AnalyzedNode ) .getAValue ( ) }
679673
680674 /**
681675 * Gets the abstract value representing an instance of this class.
682676 */
683- AbstractValue getAbstractInstanceValue ( ) {
684- result = AbstractInstance:: of ( getAstNode ( ) )
685- }
677+ AbstractValue getAbstractInstanceValue ( ) { result = AbstractInstance:: of ( getAstNode ( ) ) }
686678
687679 /**
688680 * Gets a dataflow node that refers to this class object.
@@ -691,9 +683,7 @@ class ClassNode extends DataFlow::SourceNode {
691683 t .start ( ) and
692684 result .( AnalyzedNode ) .getAValue ( ) = getAbstractClassValue ( )
693685 or
694- exists ( DataFlow:: TypeTracker t2 |
695- result = getAClassReference ( t2 ) .track ( t2 , t )
696- )
686+ exists ( DataFlow:: TypeTracker t2 | result = getAClassReference ( t2 ) .track ( t2 , t ) )
697687 }
698688
699689 /**
@@ -724,9 +714,7 @@ class ClassNode extends DataFlow::SourceNode {
724714
725715 pragma [ noinline]
726716 private DataFlow:: SourceNode getAnInstanceReferenceAux ( DataFlow:: TypeTracker t ) {
727- exists ( DataFlow:: TypeTracker t2 |
728- result = getAnInstanceReference ( t2 ) .track ( t2 , t )
729- )
717+ exists ( DataFlow:: TypeTracker t2 | result = getAnInstanceReference ( t2 ) .track ( t2 , t ) )
730718 }
731719
732720 /**
@@ -845,11 +833,12 @@ module ClassNode {
845833 */
846834 class FunctionStyleClass extends Range , DataFlow:: ValueNode {
847835 override Function astNode ;
836+
848837 AbstractFunction function ;
849838
850839 FunctionStyleClass ( ) {
851840 function .getFunction ( ) = astNode and
852- exists ( DataFlow:: PropRef read |
841+ exists ( DataFlow:: PropRef read |
853842 read .getPropertyName ( ) = "prototype" and
854843 read .getBase ( ) .analyze ( ) .getAValue ( ) = function
855844 )
@@ -901,15 +890,13 @@ module ClassNode {
901890
902891 override FunctionNode getStaticMethod ( string name ) { result = getAPropertySource ( name ) }
903892
904- override FunctionNode getAStaticMethod ( ) {
905- result = getAPropertySource ( )
906- }
893+ override FunctionNode getAStaticMethod ( ) { result = getAPropertySource ( ) }
907894
908895 /**
909896 * Gets a reference to the prototype of this class.
910897 */
911898 DataFlow:: SourceNode getAPrototypeReference ( ) {
912- exists ( DataFlow:: SourceNode base | base .analyze ( ) .getAValue ( ) = function |
899+ exists ( DataFlow:: SourceNode base | base .analyze ( ) .getAValue ( ) = function |
913900 result = base .getAPropertyRead ( "prototype" )
914901 or
915902 result = base .getAPropertySource ( "prototype" )
0 commit comments