[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 08:33:22 PDT 2024


================
@@ -876,6 +876,11 @@ class Sema;
     /// function pointer or reference (C++ [over.call.object]).
     FunctionDecl *Function;
 
+    /// LambdaName - When the OverloadCandidate is for a
+    /// lambda's operator(), points to the declaration of
+    /// the lambda variable.
+    VarDecl *LambdaName{nullptr};
----------------
zyn0217 wrote:

nit: I feel like we rarely use braced-initializer for trivial type initialization. Looking at line 877, it seems that without a default initializer is probably fine.

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


More information about the cfe-commits mailing list