================
@@ -5431,6 +5431,23 @@ TEST(Hover, HLSLRegisterAttributeRange) {
   }
 }
 
+TEST(Hover, HLSLRootSignature) {
+  Annotations T(
+      R"hlsl(
+        #define RS_CBV "CBV(b0)"
+        [^RootSignature(RS_CBV)]
+        void main() {}
+      )hlsl",
+      Annotations::Markers().setRangeBegin("{{").setRangeEnd("}}"));
+
+  TestTU TU = TestTU::withCode(T.code());
+  configureHLSL(TU);
+  auto AST = TU.build();
+  auto H = getHover(AST, T.point(), format::getLLVMStyle(), nullptr);
+  ASSERT_TRUE(H) << "Hover should have been returned for RootSignature!";
+  EXPECT_EQ(H->Name, "RootSignature");
----------------
mafeguimaraes wrote:

You're right. I've updated Hover.cpp to skip pretty-printing only for HLSL 
RootSignatureAttr, with a comment explaining why, and removed the separate 
branch. HI.Name and HI.Documentation now flow through the existing code as you 
suggested.

https://github.com/llvm/llvm-project/pull/214955
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to