We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7324177 commit 86bb884Copy full SHA for 86bb884
1 file changed
python/ql/lib/semmle/python/dataflow/new/internal/VariableCapture.qll
@@ -34,9 +34,11 @@ private module CaptureInput implements Shared::InputSig<Location> {
34
class BasicBlock extends PY::BasicBlock {
35
Callable getEnclosingCallable() { result = this.getScope() }
36
37
- // Note `PY:BasicBlock` does not have a `GetLocation` and
38
- // has a more complicated location info logic.
39
- // This is good enough for here.
+ // Note `PY:BasicBlock` does not have a `getLocation`.
+ // (Instead it has a complicated location info logic.)
+ // Using the location of the first node is simple
40
+ // and we just need a way to identify the basic block
41
+ // during debugging, so this will be serviceable.
42
Location getLocation() { result = super.getNode(0).getLocation() }
43
}
44
0 commit comments