mirror of
https://github.com/github/codeql.git
synced 2026-07-13 07:25:38 +02:00
This provides variable capture in standard situations: - nested functions - lambdas There are some deficiencies: - we do not yet handle objects capturing variables. - we do not handle variables captured via the `nonlocal` keyword. This should be solved at the AST level, though, and then it should "just work". There are still inconsistencies in the case where a `SynthesizedCaptureNode` has a comprehensions as its enclosing callable. In this case, `TFunction(cn.getEnclosingCallable())` is not defined and so getEnclosingCallable does not exist for the `CaptureNode`.
18 lines
327 B
Plaintext
18 lines
327 B
Plaintext
uniqueToString
|
|
uniqueEnclosingCallable
|
|
uniqueDominator
|
|
localDominator
|
|
localSuccessor
|
|
uniqueDefiningScope
|
|
variableIsCaptured
|
|
uniqueLocation
|
|
uniqueCfgNode
|
|
uniqueWriteTarget
|
|
uniqueWriteCfgNode
|
|
uniqueReadVariable
|
|
closureMustHaveBody
|
|
closureAliasMustBeInSameScope
|
|
variableAccessAstNesting
|
|
uniqueCallableLocation
|
|
consistencyOverview
|