File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -92,13 +92,20 @@ class InvokeNode extends DataFlow::SourceNode instanceof DataFlow::Impl::InvokeN
9292 * but the position of `z` cannot be determined, hence there are no first and second
9393 * argument nodes.
9494 */
95- DataFlow:: Node getArgument ( int i ) { result = super .getArgument ( i ) }
95+ cached
96+ DataFlow:: Node getArgument ( int i ) {
97+ result = super .getArgument ( i ) and Stages:: DataFlowStage:: ref ( )
98+ }
9699
97100 /** Gets the data flow node corresponding to an argument of this invocation. */
98- DataFlow:: Node getAnArgument ( ) { result = super .getAnArgument ( ) }
101+ cached
102+ DataFlow:: Node getAnArgument ( ) { result = super .getAnArgument ( ) and Stages:: DataFlowStage:: ref ( ) }
99103
100104 /** Gets the data flow node corresponding to the last argument of this invocation. */
101- DataFlow:: Node getLastArgument ( ) { result = this .getArgument ( this .getNumArgument ( ) - 1 ) }
105+ cached
106+ DataFlow:: Node getLastArgument ( ) {
107+ result = this .getArgument ( this .getNumArgument ( ) - 1 ) and Stages:: DataFlowStage:: ref ( )
108+ }
102109
103110 /**
104111 * Gets a data flow node corresponding to an array of values being passed as
Original file line number Diff line number Diff line change @@ -145,6 +145,12 @@ module Stages {
145145 exists ( any ( DataFlow:: PropRef ref ) .getBase ( ) )
146146 or
147147 exists ( any ( DataFlow:: ClassNode cls ) )
148+ or
149+ exists ( any ( DataFlow:: CallNode node ) .getArgument ( _) )
150+ or
151+ exists ( any ( DataFlow:: CallNode node ) .getAnArgument ( ) )
152+ or
153+ exists ( any ( DataFlow:: CallNode node ) .getLastArgument ( ) )
148154 }
149155 }
150156
You can’t perform that action at this time.
0 commit comments