Skip to content

[NFC] Refactor IsTypeDeducibleWithAuto into HlslTypes - #8902

Open
Chris B (llvm-beanz) wants to merge 2 commits into
microsoft:mainfrom
llvm-beanz:refactor-auto-deduction
Open

Chris B (llvm-beanz) wants to merge 2 commits into
microsoft:mainfrom
llvm-beanz:refactor-auto-deduction

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

This function really should be one of the standalone type query functions rather than being on Sema, and since it doesn't depend on sema in any way it was a bit odd to have it that way to begin with.

This function really should be one of the standalone type query
functions rather than being on Sema, and since it doesn't depend on sema
in any way it was a bit odd to have it that way to begin with.

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

The refactor preserves behavior; the missing direct include is a minor maintainability issue.

Pull request overview

Refactors the HLSL auto type-deducibility query from Sema into the AST type utilities without changing behavior.

Changes:

  • Moves the implementation and declaration into HlslTypes.
  • Updates the Sema call site to use the standalone query.
File summaries
File Description
tools/clang/lib/Sema/SemaHLSL.cpp Removes the Sema-owned implementation.
tools/clang/lib/Sema/SemaDecl.cpp Calls the standalone AST query.
tools/clang/lib/AST/HlslTypes.cpp Adds the relocated implementation.
tools/clang/include/clang/Sema/SemaHLSL.h Removes the old Sema declaration.
tools/clang/include/clang/AST/HlslTypes.h Exposes the query through the AST API.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

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

Comment thread tools/clang/lib/Sema/SemaDecl.cpp
Copilot AI review requested due to automatic review settings September 11, 2026 15:22

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

The implementation is moved unchanged, all references are updated, and the NFC refactor does not require release notes.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

3 participants