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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 06:44:14 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};
----------------
erichkeane wrote:

Yep, exactly.  In the instantiation of 'bar', the various calls to the 'Ls'.  Also, I was more concerned at one point because i thought this affected diagnostics, but I don't see code that does that anymore.

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


More information about the cfe-commits mailing list