mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Python: Simplify class_var_scope
Co-authored-by: yoff <lerchedahl@gmail.com>
This commit is contained in:
@@ -40,8 +40,7 @@ private predicate global_var_scope(string name, Scope scope, GlobalVariable var)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate class_var_scope(Scope scope, string name, LocalVariable var) {
|
||||
var.getScope() = scope and
|
||||
scope instanceof Class and
|
||||
private predicate class_var_scope(Class cls, string name, LocalVariable var) {
|
||||
var.getScope() = cls and
|
||||
var.getId() = name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user