mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Add classHasGlobalName into NameResolution
This commit is contained in:
@@ -513,4 +513,10 @@ module NameResolution {
|
||||
qualifiedName = append(prefix, step)
|
||||
)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
predicate classHasGlobalName(DataFlow::ClassNode cls, string name) {
|
||||
cls.flowsTo(AccessPath::getAnAssignmentTo(name)) and
|
||||
not cls.getTopLevel().isExterns() // don't propagate externs classes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,10 +119,4 @@ module UnderlyingTypes {
|
||||
// The caller is responsible for handling the class hierarchy.
|
||||
)
|
||||
}
|
||||
|
||||
pragma[nomagic]
|
||||
private predicate classHasGlobalName(DataFlow::ClassNode cls, string name) {
|
||||
cls.flowsTo(AccessPath::getAnAssignmentTo(name)) and
|
||||
not cls.getTopLevel().isExterns() // don't propagate externs classes
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user