================
@@ -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:
So, can we fix this with only single-line change as I mentioned in other
inline-comments? I.e.
- we don't need to set `HI.Name` to `"RootSignature"` explicitly because
`HI.Name = A->getSpelling();` does the same
- We don't need one more `HI.Documentation =
Attr::getDocumentation(A->getKind()).str();` because we have the same line in
original code
https://github.com/llvm/llvm-project/pull/214955
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits