mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Python: Add note about trying DataFlowDispatchPointsTo for InlineCallGraphTest
Since I was very confused about no results for __call__, I tried to see whether I had cheated by making the comparison too unfair. But it didn't seem to be the case.
This commit is contained in:
@@ -6,6 +6,10 @@ private import semmle.python.dataflow.new.internal.DataFlowDispatch as TT
|
||||
predicate pointsToCallEdge(CallNode call, Function callable) {
|
||||
exists(call.getLocation().getFile().getRelativePath()) and
|
||||
exists(callable.getLocation().getFile().getRelativePath()) and
|
||||
// I did try using viableCallable from `DataFlowDispatchPointsTo` (from temporary copy
|
||||
// of `dataflow.new.internal` that still uses points-to) instead of direct
|
||||
// `getACall()` on a Value, but it only added results for `__init__` methods, not for
|
||||
// anything else.
|
||||
exists(PythonFunctionValue funcValue |
|
||||
funcValue.getScope() = callable and
|
||||
call = funcValue.getACall()
|
||||
|
||||
Reference in New Issue
Block a user