@@ -77,7 +77,7 @@ abstract class DataFlowCall extends TDataFlowCall {
7777 abstract DataFlowCallable getEnclosingCallable ( ) ;
7878
7979 /** Gets the underlying source code call, if any. */
80- abstract CfgNodes:: StmtNodes :: CmdCfgNode asCall ( ) ;
80+ abstract CfgNodes:: CallCfgNode asCall ( ) ;
8181
8282 /** Gets a textual representation of this call. */
8383 abstract string toString ( ) ;
@@ -107,11 +107,11 @@ abstract class DataFlowCall extends TDataFlowCall {
107107}
108108
109109class NormalCall extends DataFlowCall , TNormalCall {
110- private CfgNodes:: StmtNodes :: CmdCfgNode c ;
110+ private CfgNodes:: CallCfgNode c ;
111111
112112 NormalCall ( ) { this = TNormalCall ( c ) }
113113
114- override CfgNodes:: StmtNodes :: CmdCfgNode asCall ( ) { result = c }
114+ override CfgNodes:: CallCfgNode asCall ( ) { result = c }
115115
116116 override DataFlowCallable getEnclosingCallable ( ) { result = TCfgScope ( c .getScope ( ) ) }
117117
@@ -121,7 +121,7 @@ class NormalCall extends DataFlowCall, TNormalCall {
121121}
122122
123123/** A call for which we want to compute call targets. */
124- private class RelevantCall extends CfgNodes:: StmtNodes :: CmdCfgNode { }
124+ private class RelevantCall extends CfgNodes:: CallCfgNode { }
125125
126126/** Holds if `call` may resolve to the returned source-code method. */
127127private DataFlowCallable viableSourceCallable ( DataFlowCall call ) {
@@ -139,15 +139,7 @@ class AdditionalCallTarget extends Unit {
139139 /**
140140 * Gets a viable target for `call`.
141141 */
142- abstract DataFlowCallable viableTarget ( CfgNodes:: StmtNodes:: CmdCfgNode call ) ;
143- }
144-
145- /** Holds if `call` may resolve to the returned summarized library method. */
146- DataFlowCallable viableLibraryCallable ( DataFlowCall call ) {
147- exists ( LibraryCallable callable |
148- result = TLibraryCallable ( callable ) and
149- call .asCall ( ) .getStmt ( ) = callable .getACall ( )
150- )
142+ abstract DataFlowCallable viableTarget ( CfgNodes:: CallCfgNode call ) ;
151143}
152144
153145cached
@@ -158,33 +150,29 @@ private module Cached {
158150 TLibraryCallable ( LibraryCallable callable )
159151
160152 cached
161- newtype TDataFlowCall = TNormalCall ( CfgNodes:: StmtNodes :: CmdCfgNode c )
153+ newtype TDataFlowCall = TNormalCall ( CfgNodes:: CallCfgNode c )
162154
163155 /** Gets a viable run-time target for the call `call`. */
164156 cached
165- DataFlowCallable viableCallable ( DataFlowCall call ) {
166- result = viableSourceCallable ( call )
167- or
168- result = viableLibraryCallable ( call )
169- }
157+ DataFlowCallable viableCallable ( DataFlowCall call ) { result = viableSourceCallable ( call ) }
170158
171159 cached
172160 newtype TArgumentPosition =
173161 TKeywordArgumentPosition ( string name ) { name = any ( CmdParameter p ) .getName ( ) } or
174162 TPositionalArgumentPosition ( int pos , NamedSet ns ) {
175- exists ( Cmd cmd |
176- cmd = ns .getABindingCall ( ) and
177- exists ( cmd .getArgument ( pos ) )
163+ exists ( CfgNodes :: CallCfgNode call |
164+ call = ns .getABindingCall ( ) and
165+ exists ( call .getArgument ( pos ) )
178166 )
179167 }
180168
181169 cached
182170 newtype TParameterPosition =
183171 TKeywordParameter ( string name ) { name = any ( CmdParameter p ) .getName ( ) } or
184172 TPositionalParameter ( int pos , NamedSet ns ) {
185- exists ( Cmd cmd |
186- cmd = ns .getABindingCall ( ) and
187- exists ( cmd .getArgument ( pos ) )
173+ exists ( CfgNodes :: CallCfgNode call |
174+ call = ns .getABindingCall ( ) and
175+ exists ( call .getArgument ( pos ) )
188176 )
189177 }
190178}
0 commit comments