File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
python/tools/recorded-call-graph-metrics/ql Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,14 @@ module PointsToBasedCallGraph {
248248 xmlCallee = this .getXMLCallee ( ) and
249249 (
250250 xmlCallee instanceof XMLPythonCallee and
251- calleeValue .( PythonFunctionValue ) .getScope ( ) = xmlCallee .( XMLPythonCallee ) .getACallee ( )
251+ (
252+ // normal function
253+ calleeValue .( PythonFunctionValue ) .getScope ( ) = xmlCallee .( XMLPythonCallee ) .getACallee ( )
254+ or
255+ // class instantiation -- points-to says the call goes to the class
256+ calleeValue .( ClassValue ) .lookup ( "__init__" ) .( PythonFunctionValue ) .getScope ( ) =
257+ xmlCallee .( XMLPythonCallee ) .getACallee ( )
258+ )
252259 or
253260 xmlCallee instanceof XMLExternalCallee and
254261 calleeValue .( BuiltinFunctionObjectInternal ) .getBuiltin ( ) =
You can’t perform that action at this time.
0 commit comments