[NFC] Refactor IsTypeDeducibleWithAuto into HlslTypes - #8902
Open
Chris B (llvm-beanz) wants to merge 2 commits into
Open
Chris B (llvm-beanz) wants to merge 2 commits into
Chris B (llvm-beanz) wants to merge 2 commits into
Conversation
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.
Contributor
There was a problem hiding this comment.
🟢 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.
Contributor
There was a problem hiding this comment.
🟢 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
Deric C. (Icohedron)
approved these changes
Sep 11, 2026
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.
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.