Skip to content

Unified: Move extension workaround into static name binding library - #22481

Merged
hvitved merged 1 commit into
github:mainfrom
hvitved:unified/static-namebinding-extensions
Sep 1, 2026
Merged

Unified: Move extension workaround into static name binding library#22481
hvitved merged 1 commit into
github:mainfrom
hvitved:unified/static-namebinding-extensions

Conversation

@hvitved

@hvitved hvitved commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

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.

Copilot review overview

🟡 Changes recommended

Qualified extension targets such as Outer.Inner remain unresolvable because they are represented as one identifier.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity unified/​ql/​lib/​codeql/​unified/​internal/​LocalNameBinding.qll — This only turns unqualified extension targets into usable accesses. The Swift mapper stores the…
What changed in this PR

Moves Swift extension-target handling into local/static name binding.

Changes:

  • Treats extension names as accesses rather than declarations.
  • Removes downstream extension-specific exclusions.
  • Adds an unqualified extension binding test.
File Description
AnalysisQuality.qll Includes extension targets in resolution statistics.
LocalNameBinding.qll Reclassifies extension names as accesses.
StaticNameBinding.qll Removes the folder-level workaround.
test.swift Tests unqualified extension resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread unified/ql/lib/codeql/unified/internal/LocalNameBinding.qll
@hvitved
hvitved force-pushed the unified/static-namebinding-extensions branch from 4e38438 to 3ca261a Compare September 1, 2026 12:11
@hvitved
hvitved marked this pull request as ready for review September 1, 2026 12:12
@hvitved
hvitved requested a review from a team as a code owner September 1, 2026 12:12
@hvitved
hvitved requested a review from asgerf September 1, 2026 12:12
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Sep 1, 2026
@hvitved
hvitved merged commit 4138d65 into github:main Sep 1, 2026
15 of 16 checks passed
@hvitved
hvitved deleted the unified/static-namebinding-extensions branch September 1, 2026 12:28
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