[clang-tools-extra] [clangd][HLSL] Prevent RootSignature internal identifier leak on hover (PR #214955)
Aleksandr Platonov via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 21 05:12:16 PDT 2026
================
@@ -1013,6 +1013,15 @@ std::optional<HoverInfo> getHoverContents(const SelectionTree::Node *N,
// Generates hover info for attributes.
std::optional<HoverInfo> getHoverContents(const Attr *A, ParsedAST &AST) {
HoverInfo HI;
+
+ if (AST.getLangOpts().HLSL && llvm::isa<RootSignatureAttr>(A)) {
+ // We do not use pretty print here because it would expose the internal
+ // string/macro representation instead of the original source attribute.
+ HI.Name = "RootSignature";
+ HI.Documentation = Attr::getDocumentation(A->getKind()).str();
+ return HI;
+ }
----------------
ArcsinX wrote:
And remove everything here
https://github.com/llvm/llvm-project/pull/214955
More information about the cfe-commits
mailing list