Python: Make API::Node::getACall return a CallCfgNode

This should eliminate the need for explicit casting to
`CallCfgNode` (which does not appear in our code as far as I can see,
but was observed in an external contribution).
This commit is contained in:
Taus Brock-Nannestad
2021-03-22 16:29:57 +01:00
parent 119872d8a4
commit 4a6589d0ae
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
lgtm,codescanning
* The `API::Node::getACall` method now has the more specific return type `DataFlow::CallCfgNode`, which improves the ease of use when working with calls to API functions.

View File

@@ -55,7 +55,7 @@ module API {
/**
* Gets a call to the function represented by this API component.
*/
DataFlow::Node getACall() { result = getReturn().getAnImmediateUse() }
DataFlow::CallCfgNode getACall() { result = getReturn().getAnImmediateUse() }
/**
* Gets a node representing member `m` of this API component.