================
@@ -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");
----------------
ArcsinX wrote:
I checked that this test passes even without your patch.
So, I think that `A->getSpelling()` is equal to `RootSignature` for
`RootSignatureAttr`, but the problem is how we fill `HI.Definition`?
https://github.com/llvm/llvm-project/pull/214955
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits