Skip to content

CFG: Various changes in preparation for Rust adoption - #23162

Merged
hvitved merged 6 commits into
github:mainfrom
hvitved:cfg/rust-preparations
Nov 18, 2026
Merged

hvitved merged 6 commits into
github:mainfrom
hvitved:cfg/rust-preparations

Conversation

@hvitved

@hvitved hvitved commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Commit-by-commit review is suggested.

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Nov 18, 2026
@hvitved
hvitved requested a max review from Copilot November 18, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The PR description needs DCA results for the final case-body successor and do-loop changes, including an assessment of changed results and any unexpected regressions.

1 open issue
What changed in this PR

Prepares the shared control-flow graph library for Rust adoption, with corresponding Go adapter and C# test expectation updates.

Changes:

  • Propagates values from terminal switch-case bodies and models conditionless do-loops as infinite loops.
  • Adjusts label binding requirements and simplifies Go labels to strings.
  • Updates C# graph expectations to reflect switch-expression value propagation.
File Description
shared/​controlflow/​codeql/​controlflow/​ControlFlowGraph.qll Updates switch, loop, and label handling.
go/​ql/​lib/​semmle/​go/​controlflow/​ControlFlowGraphImpl.qll Replaces the label class with a string alias.
csharp/​ql/​test/​library-tests/​controlflow/​graph/​NodeGraph.expected Updates switch-expression nodes and edges.
csharp/​ql/​test/​library-tests/​controlflow/​graph/​EnclosingCallable.expected Records enclosing callables for new nodes and blocks.
csharp/​ql/​test/​library-tests/​controlflow/​graph/​Dominance.expected Updates dominance relationships for changed switch flow.
csharp/​ql/​test/​library-tests/​controlflow/​graph/​Condition.expected Updates condition relationships and flow.
csharp/​ql/​test/​library-tests/​controlflow/​graph/​BasicBlock.expected Updates switch-expression block boundaries and sizes.

Review effort: Max

@hvitved
hvitved marked this pull request as ready for review November 18, 2026 12:16
@hvitved
hvitved requested review from a team as code owners November 18, 2026 12:16
@hvitved
hvitved requested a review from aschackmull November 18, 2026 12:16

@aschackmull aschackmull left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hvitved
hvitved merged commit 4375574 into github:main Nov 18, 2026
112 of 116 checks passed
@hvitved
hvitved deleted the cfg/rust-preparations branch November 18, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C# Go no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants