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

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 4 22:27:24 PDT 2026


================
@@ -951,6 +951,22 @@ llvm::StringLiteral getNameForExpr(const Expr *E) {
 void maybeAddCalleeArgInfo(const SelectionTree::Node *N, HoverInfo &HI,
                            const PrintingPolicy &PP);
 
+static std::optional<HoverInfo> getHoverContents(const Expr *E, ParsedAST &AST,
----------------
HighCommander4 wrote:

I would inline the contents of this function into its caller.

Otherwise, we have a function with a fairly generic name and signature (`getHoverContents`, takes an `Expr*`) which only handles a subset of expression types for which we have a hover to show, with the caller handling other expression types, and it's not clear what is the purpose of having these separate.

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


More information about the cfe-commits mailing list