Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ead2e3 commit 367a498Copy full SHA for 367a498
1 file changed
python/tools/recorded-call-graph-metrics/ql/RecordedCalls.qll
@@ -248,7 +248,14 @@ module PointsToBasedCallGraph {
248
xmlCallee = this.getXMLCallee() and
249
(
250
xmlCallee instanceof XMLPythonCallee and
251
- calleeValue.(PythonFunctionValue).getScope() = xmlCallee.(XMLPythonCallee).getACallee()
+ (
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
+ )
259
or
260
xmlCallee instanceof XMLExternalCallee and
261
calleeValue.(BuiltinFunctionObjectInternal).getBuiltin() =
0 commit comments