Copilot
c24e476879
Shared CFG: support for-else and while-else loops
...
Add two default predicates to AstSig:
default AstNode getWhileElse(WhileStmt loop) { none() }
default AstNode getForeachElse(ForeachStmt loop) { none() }
When defined, the explicit-step rules for While/Do and Foreach
route the loop's normal-completion exits through the else block
before reaching the after-loop node:
- WhileStmt: after-false condition -> before-else -> after-while
(instead of directly after-while).
- ForeachStmt: after-collection [empty] and the LoopHeader exit
are both routed through before-else -> after-foreach.
Python's Ast module overrides the predicates to return the
synthetic BlockStmt for the orelse slot, replacing the previous
customisations in Input::step. This eliminates parallel direct
successors emitted by the previous Python-side step additions
(verified: multipleSuccessors on a CPython database goes from
1340 to 0).
Java and C# CFG tests are unaffected.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-05-28 21:09:40 +00:00
Óscar San José
996e79131e
Merge branch 'main' into post-release-prep/codeql-cli-2.25.5
2026-05-22 16:32:30 +02:00
Owen Mansel-Chan
7e6b10e8cf
Merge pull request #21879 from owen-mc/shared/cfg/simpleleafnode
...
Shared CFG: update `simpleLeafNode` to exclude those with additional leaf nodes
2026-05-21 14:58:04 +01:00
Owen Mansel-Chan
c3bafc75ab
Shared CFG: allow statements for init and update of for loop
2026-05-21 13:40:26 +01:00
Owen Mansel-Chan
19f93cd18b
Shared CFG: update simpleLeafNode to exclude those with additional nodes
2026-05-21 13:31:56 +01:00
github-actions[bot]
9f64000962
Post-release preparation for codeql-cli-2.25.5
2026-05-18 15:20:31 +00:00
github-actions[bot]
e38616a2ef
Release preparation for version 2.25.5
2026-05-18 12:05:32 +00:00
Anders Schack-Mulligen
81e1ab7aab
Merge pull request #21808 from aschackmull/cfg/switch-pattern-eval
...
Cfg: Rework CFG for switch case patterns.
2026-05-08 12:48:44 +02:00
Anders Schack-Mulligen
048411e168
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2026-05-08 08:11:32 +02:00
Anders Schack-Mulligen
48785a0a76
Cfg: Rework CFG for switch case patterns.
2026-05-07 13:07:07 +02:00
github-actions[bot]
7610277199
Post-release preparation for codeql-cli-2.25.4
2026-05-05 10:10:06 +00:00
github-actions[bot]
88e1d86c27
Release preparation for version 2.25.4
2026-05-05 09:34:30 +00:00
Tom Hvitved
e14b654e8a
Update shared/controlflow/codeql/controlflow/ControlFlowGraph.qll
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2026-04-29 14:57:35 +02:00
Tom Hvitved
cbe207ab65
C#: Include parameters and their defaults in the CFG
2026-04-29 14:01:09 +02:00
Tom Hvitved
c64223ae56
Merge pull request #21748 from hvitved/shared/remove-deprecated
...
Shared: Remove deprecated code
2026-04-23 14:44:17 +02:00
Tom Hvitved
90ae086822
Shared: Remove deprecated code
2026-04-23 11:24:14 +02:00
Tom Hvitved
1a84b2b555
CFG: Use dense ranking
2026-04-23 11:22:38 +02:00
Tom Hvitved
71fa2166ee
Apply suggestions from code review
...
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com >
2026-04-22 17:06:31 +02:00
Tom Hvitved
39cd86a48e
C#: Move handling of callables into shared control flow library
2026-04-22 14:11:57 +02:00
Anders Schack-Mulligen
f912731cd4
Merge pull request #21565 from aschackmull/csharp/cfg2
...
C#: Replace CFG with the shared implementation
2026-04-21 15:50:38 +02:00
Anders Schack-Mulligen
67c0515d3c
Cfg: Undo consistency check change.
2026-04-21 13:10:03 +02:00
Anders Schack-Mulligen
9de02b7ae6
Cfg: Use consistent casing in additional node tags.
2026-04-21 10:56:10 +02:00
Anders Schack-Mulligen
e928c224ae
C#/Cfg: Some simple review fixes.
2026-04-20 14:43:27 +02:00
github-actions[bot]
a0bab539bb
Post-release preparation for codeql-cli-2.25.3
2026-04-20 12:40:34 +00:00
github-actions[bot]
c861d99802
Release preparation for version 2.25.3
2026-04-20 09:27:23 +00:00
Anders Schack-Mulligen
d5c9fd1085
C#/Cfg: A bit more qldoc.
2026-04-10 15:47:25 +02:00
Anders Schack-Mulligen
ff978d1a8c
C#: Replace CFG.
2026-04-10 15:47:13 +02:00
Anders Schack-Mulligen
b85b02abb4
Cfg: Add dominance predicates to shared ControlFlowNode.
2026-04-10 15:47:10 +02:00
Anders Schack-Mulligen
88aaff863b
Cfg: Extend consistency checks.
2026-04-10 15:47:09 +02:00
Anders Schack-Mulligen
6ffed8523c
Cfg/Java: Move InstanceOfExpr CFG into shared lib.
2026-04-10 15:47:09 +02:00
Anders Schack-Mulligen
0b6c416fd4
Cfg: Support short-circuiting compound assignments.
2026-04-10 15:47:08 +02:00
Anders Schack-Mulligen
a53cffc121
Cfg: Support GotoStmt.
2026-04-10 15:47:07 +02:00
Anders Schack-Mulligen
93a594e9c0
Cfg: Support Throw expressions.
2026-04-10 15:47:07 +02:00
github-actions[bot]
242090e0ac
Post-release preparation for codeql-cli-2.25.2
2026-04-06 13:49:20 +00:00
github-actions[bot]
4fe2f6d2b4
Release preparation for version 2.25.2
2026-04-06 10:30:38 +00:00
github-actions[bot]
ce6e6d5db3
Post-release preparation for codeql-cli-2.25.1
2026-03-30 08:43:48 +00:00
github-actions[bot]
fb011842c9
Release preparation for version 2.25.1
2026-03-25 23:43:06 +00:00
github-actions[bot]
8cf0954796
Release preparation for version 2.25.1
2026-03-25 08:28:30 +00:00
github-actions[bot]
d6055754b6
Release preparation for version 2.25.0
2026-03-16 12:15:34 +00:00
Anders Schack-Mulligen
efa797a21d
Update shared/controlflow/codeql/controlflow/ControlFlowGraph.qll
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-03-10 11:22:15 +01:00
Anders Schack-Mulligen
77d4f5a2dc
Cfg: Update fallsThrough default.
2026-03-10 11:10:24 +01:00
Anders Schack-Mulligen
edf88b34da
Cfg: Move Case.getBodyElement to shared code.
2026-03-10 11:02:58 +01:00
Anders Schack-Mulligen
35ac66d3aa
Cfg: Move getCaseControlFlowOrder to shared code.
2026-03-10 10:39:32 +01:00
Óscar San José
3b9eba2afc
Merge branch 'main' of https://github.com/github/codeql into oscarsj/merge-back-rc-3.21
2026-03-06 16:20:36 +01:00
Anders Schack-Mulligen
3e7a966c0d
Merge pull request #21408 from aschackmull/guards/perf-tweak
...
Guards: Improve performance of forall in guardDeterminesPhiInput.
2026-03-05 12:42:06 +01:00
Anders Schack-Mulligen
37a8fc85eb
Guards: Use unique aggregate.
2026-03-05 11:20:24 +01:00
Anders Schack-Mulligen
ad5ab9f270
Gaurds: Improve perf of forall in guardDeterminesPhiInput.
2026-03-04 10:56:51 +01:00
Anders Schack-Mulligen
d9ea78bfb8
Cfg: Step directly from a failed case guard to the next case.
2026-03-03 13:42:13 +01:00
Anders Schack-Mulligen
f02abb3e93
Cfg: Handle ExprStmt and BlockStmt in defaultStep.
2026-03-03 13:34:27 +01:00
github-actions[bot]
e152f08468
Post-release preparation for codeql-cli-2.24.3
2026-03-02 22:51:27 +00:00