Files
codeql/python/ql/test/library-tests/PointsTo/local/LocalPointsTo.ql
yoff 04b130f57f Python: fix library-test compile errors and rebless after CFG migration
Library-test compile fixes after the shared-CFG migration:
- PointsTo/global, PointsTo/local: use `f.getNode() = s.getValue()`
  instead of `s.getValue().getAFlowNode() = f` (the new CFG does not
  surface getAFlowNode on AST nodes).
- PointsTo/new/ImpliesDataflow: bridge new Cfg::ControlFlowNode to the
  legacy ControlFlowNodeWithPointsTo via AST identity.
- frameworks/aiohttp + frameworks/modeling-example: qualify CallNode /
  NameNode / AttrNode casts with Cfg:: now that those names live in
  the new CFG facade.

Rebless 4 expected files for toString-only differences (renamed CFG
positions like 'CFG node for foo' vs 'foo' — no semantic change):
ImpliesDataflow, EnclosingCallable, NaiveModel, ProperModel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-28 21:09:49 +00:00

10 lines
292 B
Plaintext

import python
import semmle.python.pointsto.PointsTo
import semmle.python.objects.ObjectInternal
from ControlFlowNode f, ObjectInternal obj, ControlFlowNode orig
where
exists(ExprStmt s | f.getNode() = s.getValue()) and
PointsTo::pointsTo(f, _, obj, orig)
select f, obj.toString(), orig