@@ -14,7 +14,7 @@ private import DataFlowImplCommon as DataFlowImplCommon
1414cached
1515DataFlowCallable defaultViableCallable ( DataFlowCall call ) {
1616 DataFlowImplCommon:: forceCachingInSameStage ( ) and
17- result = TSourceCallable ( call .getStaticCallTarget ( ) )
17+ result = call .getStaticCallTarget ( )
1818 or
1919 // If the target of the call does not have a body in the snapshot, it might
2020 // be because the target is just a header declaration, and the real target
@@ -80,7 +80,7 @@ private module VirtualDispatch {
8080 exists ( DataFlowCall call , Position i |
8181 other
8282 .( DataFlow:: ParameterNode )
83- .isParameterOf ( TSourceCallable ( pragma [ only_bind_into ] ( call ) .getStaticCallTarget ( ) ) , i ) and
83+ .isParameterOf ( pragma [ only_bind_into ] ( call ) .getStaticCallTarget ( ) , i ) and
8484 src .( ArgumentNode ) .argumentOf ( call , pragma [ only_bind_into ] ( pragma [ only_bind_out ] ( i ) ) )
8585 ) and
8686 allowOtherFromArg = true and
@@ -89,7 +89,7 @@ private module VirtualDispatch {
8989 // Call return
9090 exists ( DataFlowCall call , ReturnKind returnKind |
9191 other = getAnOutNode ( call , returnKind ) and
92- returnNodeWithKindAndEnclosingCallable ( src , returnKind , TSourceCallable ( call .getStaticCallTarget ( ) ) )
92+ returnNodeWithKindAndEnclosingCallable ( src , returnKind , call .getStaticCallTarget ( ) )
9393 ) and
9494 allowFromArg = false
9595 or
@@ -176,7 +176,7 @@ private module VirtualDispatch {
176176 /** Call to a virtual function. */
177177 private class DataSensitiveOverriddenFunctionCall extends DataSensitiveCall {
178178 DataSensitiveOverriddenFunctionCall ( ) {
179- exists ( this .getStaticCallTarget ( ) .( VirtualFunction ) .getAnOverridingFunction ( ) )
179+ exists ( this .getStaticCallTarget ( ) .asSourceCallable ( ) . ( VirtualFunction ) .getAnOverridingFunction ( ) )
180180 }
181181
182182 override DataFlow:: Node getDispatchValue ( ) { result .asInstruction ( ) = this .getArgument ( - 1 ) }
@@ -194,7 +194,7 @@ private module VirtualDispatch {
194194 */
195195 pragma [ noinline]
196196 private predicate overrideMayAffectCall ( Class overridingClass , MemberFunction overridingFunction ) {
197- overridingFunction .getAnOverriddenFunction + ( ) = this .getStaticCallTarget ( ) .( VirtualFunction ) and
197+ overridingFunction .getAnOverriddenFunction + ( ) = this .getStaticCallTarget ( ) .asSourceCallable ( ) . ( VirtualFunction ) and
198198 overridingFunction .getDeclaringType ( ) = overridingClass
199199 }
200200
@@ -277,7 +277,7 @@ DataFlowCallable viableImplInCallContext(DataFlowCall call, DataFlowCall ctx) {
277277 result = viableCallable ( call ) and
278278 exists ( int i , DataFlowCallable f |
279279 mayBenefitFromCallContext ( pragma [ only_bind_into ] ( call ) , f , i ) and
280- f . asSourceCallable ( ) = ctx .getStaticCallTarget ( ) and
280+ f = ctx .getStaticCallTarget ( ) and
281281 result = TSourceCallable ( ctx .getArgument ( i ) .getUnconvertedResultExpression ( ) .( FunctionAccess ) .getTarget ( ) )
282282 )
283283}
0 commit comments