mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: Make UnresolvedCalls.qll handle class calls without __init__
This commit used to make sense to have here in the ordering of commits, but due to various rebases it no longer changes any test output.. it's still a good change though, so I'll keep it.
This commit is contained in:
@@ -12,13 +12,8 @@ class UnresolvedCallExpectations extends InlineExpectationsTest {
|
|||||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||||
exists(location.getFile().getRelativePath()) and
|
exists(location.getFile().getRelativePath()) and
|
||||||
exists(CallNode call |
|
exists(CallNode call |
|
||||||
not exists(DataFlowPrivate::DataFlowCall dfc | dfc.getNode() = call |
|
not exists(DataFlowPrivate::DataFlowCall dfc | dfc.getNode() = call) and
|
||||||
// For every `CallNode`, there is a `DataFlowCall` in the form of a `NormalCall`.
|
not DataFlowPrivate::resolveClassCall(call, _) and
|
||||||
// It does not really count, as it has some abstract overrides. For instance, it does not
|
|
||||||
// define `getCallable`, so checking for the existence of this guarantees that we are in a
|
|
||||||
// properly resolved call.
|
|
||||||
exists(dfc.getCallable())
|
|
||||||
) and
|
|
||||||
not call = API::builtin(_).getACall().asCfgNode() and
|
not call = API::builtin(_).getACall().asCfgNode() and
|
||||||
location = call.getLocation() and
|
location = call.getLocation() and
|
||||||
tag = "unresolved_call" and
|
tag = "unresolved_call" and
|
||||||
|
|||||||
Reference in New Issue
Block a user