Skip to content

CFG: Avoid bad join in {begin,end}AbruptCompletion - #22989

Merged
hvitved merged 1 commit into
mainfrom
hvitved-shared-cfg-completions
Nov 3, 2026
Merged

hvitved merged 1 commit into
mainfrom
hvitved-shared-cfg-completions

Conversation

@hvitved

@hvitved hvitved commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Needed for Rust, where we otherwise get a bad join because TLabeledAbruptCompletion is not joined on both columns simultaneously.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@hvitved hvitved changed the title Fix shared CFG abrupt completion construction CFG: Avoid bad join in {begin,emdAbruptCompletion Nov 3, 2026
@hvitved hvitved changed the title CFG: Avoid bad join in {begin,emdAbruptCompletion CFG: Avoid bad join in {begin,end}AbruptCompletion Nov 3, 2026
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Nov 3, 2026
@hvitved
hvitved marked this pull request as ready for review November 3, 2026 08:38
Copilot AI auto review requested due to automatic review settings November 3, 2026 08:38
@hvitved
hvitved requested a review from a team as a code owner November 3, 2026 08:38
@hvitved
hvitved requested a review from aschackmull November 3, 2026 08:38

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.

🟢 Approval recommended

No active review issues were identified for the shared control-flow abrupt-completion changes.

No open issues 🎉

What changed in this PR

Updates shared control-flow graph handling to avoid inefficient joins in abrupt-completion processing, addressing the issue encountered with Rust.

Changes:

  • Constructs abrupt completions directly from successor types and optional labels in beginAbruptCompletion.
  • Applies the same approach to loop break and continue handling in endAbruptCompletion, joining both labeled-completion columns together.
File Description
shared/​controlflow/​codeql/​controlflow/​ControlFlowGraph.qll Replaces separate successor-type and label lookups with direct abrupt-completion constructor matches.

Review effort: Balanced (auto)

@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 9e8089e into main Nov 3, 2026
112 checks passed
@hvitved
hvitved deleted the hvitved-shared-cfg-completions branch November 3, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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