mirror of
https://github.com/github/codeql.git
synced 2026-02-24 10:53:49 +01:00
Python: Remove points-to from Module
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
import Definition
|
||||
|
||||
/**
|
||||
@@ -58,7 +59,7 @@ predicate unused_global(Name unused, GlobalVariable v) {
|
||||
// indirectly
|
||||
defn.getBasicBlock().reachesExit() and u.getScope() != unused.getScope()
|
||||
) and
|
||||
not unused.getEnclosingModule().getAnExport() = v.getId() and
|
||||
not unused.getEnclosingModule().(ModuleWithPointsTo).getAnExport() = v.getId() and
|
||||
not exists(unused.getParentNode().(ClassDef).getDefinedClass().getADecorator()) and
|
||||
not exists(unused.getParentNode().(FunctionDef).getDefinedFunction().getADecorator()) and
|
||||
unused.defines(v) and
|
||||
|
||||
Reference in New Issue
Block a user