Open kalexmills opened 3 years ago
This will require:
1) Inspecting for SelectorExpr
and doing (a very simple) name resolution to find pointer arguments passed into functions on the LHS of the .
2) Modifying the callgraph to include functions with pointer receivers as part of the the signature of function declarations.
3) Modify pointerescapes to know whether a CallExpr
is contained within a SelectorExpr
, and look up the signature accordingly.
It is still the case that no type-checking needs to be performed here.
Another way a pointer from a range loop can be passed into a function is via a pointer receiver. Currently this is ignored, but it can also lead to issues in cases where the pointer receiver is written elsewhere in memory or used inside a goroutine.