Files
codeql/python/ql/test/library-tests
Copilot f12307278a Python: wire match-pattern bindings into the shared CFG (green)
Adds concrete `Pattern` subclasses in `AstNodeImpl.qll` for every
`MatchPattern` AST kind, with `getChild` overrides that expose
sub-patterns and bound Names. Specifically:

- MatchCapturePattern (`case x:`) -> getVariable()
- MatchAsPattern (`case … as v:`) -> getPattern(), getAlias()
- MatchStarPattern (`case [*rest]:`) -> getTarget()
- MatchSequencePattern (`case [a, b]:`) -> getPattern(i)
- MatchClassPattern (`case Cls(p, q, k=v)`) -> getClass(), positional, keyword
- MatchMappingPattern (`case {k: v}:`) -> getMapping(i)
- MatchKeyValuePattern, MatchKeywordPattern, MatchDoubleStarPattern
- MatchOrPattern, MatchLiteralPattern, MatchValuePattern

Without these, every Name bound by a match pattern lacked a CFG node.
Removes the corresponding MISSING: annotations from match_pattern.py
(all 11 cases).

Verified: all 24 ControlFlow/evaluation-order tests still pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-26 16:32:42 +00:00
..
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2026-04-14 13:27:31 +02:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2022-08-24 16:51:50 +01:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2023-11-06 13:50:55 +00:00
2025-11-26 12:30:31 +00:00
2025-11-26 12:30:31 +00:00
2023-04-26 13:41:57 +02:00