diff --git a/python/ql/lib/semmle/python/controlflow/internal/Cfg.qll b/python/ql/lib/semmle/python/controlflow/internal/Cfg.qll index 731f3c4a53a2..6dcdb021195b 100644 --- a/python/ql/lib/semmle/python/controlflow/internal/Cfg.qll +++ b/python/ql/lib/semmle/python/controlflow/internal/Cfg.qll @@ -68,6 +68,7 @@ class ControlFlowNode extends CfgImpl::ControlFlowNode { BasicBlock getBasicBlock() { result = super.getBasicBlock() } /** Gets the scope containing this flow node. */ + cached Py::Scope getScope() { result = super.getEnclosingCallable().asScope() } /** Gets the enclosing module. */