Skip to content

Commit f3ce181

Browse files
yoffCopilot
andcommitted
Python: cache shared CFG scope
Cache the Python-local shared-CFG scope relation after semantic inputs and before staged SSA and dataflow consumers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 529363f5-bc7d-4f0b-9f47-e03ba9aa0cdf
1 parent 0be994c commit f3ce181

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • python/ql/lib/semmle/python/controlflow/internal

‎python/ql/lib/semmle/python/controlflow/internal/Cfg.qll‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class ControlFlowNode extends CfgImpl::ControlFlowNode {
6868
BasicBlock getBasicBlock() { result = super.getBasicBlock() }
6969

7070
/** Gets the scope containing this flow node. */
71+
cached
7172
Py::Scope getScope() { result = super.getEnclosingCallable().asScope() }
7273

7374
/** Gets the enclosing module. */

0 commit comments

Comments
 (0)