Repository navigation
CFG: Various changes in preparation for Rust adoption - #23162
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Commit-by-commit review is suggested.