mirror of
https://github.com/github/codeql.git
synced 2025-12-24 12:46:34 +01:00
Manually write out a transitive closure.
This commit is contained in:
committed by
Erik Krogh Kristensen
parent
ea70aaff57
commit
820dfac48c
@@ -203,13 +203,22 @@ private class ConstantAmdDependencyPathElement extends PathExpr, ConstantString
|
||||
override string getValue() { result = getStringValue() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `nd` is nested inside an AMD module definition.
|
||||
*/
|
||||
private predicate inAmdModuleDefinition(AstNode nd) {
|
||||
nd.getParent() instanceof AmdModuleDefinition
|
||||
or
|
||||
inAmdModuleDefinition(nd.getParent())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `def` is an AMD module definition in `tl` which is not
|
||||
* nested inside another module definition.
|
||||
*/
|
||||
private predicate amdModuleTopLevel(AmdModuleDefinition def, TopLevel tl) {
|
||||
def.getTopLevel() = tl and
|
||||
not def.getParent+() instanceof AmdModuleDefinition
|
||||
not inAmdModuleDefinition(def)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user