[clang-tools-extra] [clangd][HLSL] Add hover support for vector swizzle and matrix element access (PR #212741)

Maria Fernanda GuimarĂ£es via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 31 18:02:34 PDT 2026


================
@@ -5311,6 +5311,109 @@ TEST(Hover, FunctionParameters) {
   }
 }
 
+TEST(Hover, HLSLVectorAndMatrixSwizzle) {
+  struct {
+    const char *const Code;
+    const std::function<void(HoverInfo &)> ExpectedBuilder;
+  } Cases[] = {
+      {
+          R"cpp(
+            typedef float float3 __attribute__((ext_vector_type(3)));
+            void main() {
+              float3 v;
+              float3 s = v.^[[xyz]];
+            }
+          )cpp",
----------------
mafeguimaraes wrote:

Applied, thanks, switched all the raw string delimiters in the new tests to `hlsl`.

https://github.com/llvm/llvm-project/pull/212741


More information about the cfe-commits mailing list