mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Add test for call.getFunction().refersTo
Showing that `call.getFunction().refersTo(func)` gives different results from `call = func.getACall()`
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
| 19 | ControlFlowNode for f() | Function f |
|
||||
| 21 | ControlFlowNode for f() | Function f |
|
||||
| 25 | ControlFlowNode for Attribute() | Function n |
|
||||
| 33 | ControlFlowNode for Attribute() | Function foo |
|
||||
| 34 | ControlFlowNode for Attribute() | Function foo |
|
||||
@@ -0,0 +1,5 @@
|
||||
import python
|
||||
|
||||
from CallNode call, FunctionObject func
|
||||
where call.getFunction().refersTo(func)
|
||||
select call.getLocation().getStartLine(), call.toString(), func.toString()
|
||||
Reference in New Issue
Block a user