LLVM Project BlogMaria Fernanda Guimarães8 min readintermediate
GSoC 2026: Improving HLSL Support in clangd
Summary
The GSoC 2026 project identified and closed numerous gaps in clangd’s HLSL support. By performing a systematic gap analysis, the author authored an RFC, opened 11 GitHub issues, and landed multiple PRs that improve hover (semantic annotations, out/inout parameters, swizzles, RootSignature, register ranges) and code‑completion (attributes, register, semantic annotations, swizzle). The work also ex…
- Systematic gap analysis (test cases + AST inspection) is essential to decide whether to extend clangd or Clang.
- Many HLSL features are already present in the AST; exposing them via clangd often requires only thin infrastructure changes.
- Hover and completion for HLSL can be implemented as independent PRs per feature, easing review and upstreaming.
- Multiple entry points in a single HLSL file need a compilation‑context switching mechanism; a library‑mode fallback works for modern HLSL.
Improving clangd’s HLSL support directly enhances the developer experience for GPU shader programmers, reducing friction when writing and debugging shaders in IDEs. The project also demonstrates a repeatable process for extending language‑server features for domain‑specific languages, which can be…
6/10
