[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
Fri Sep 6 06:47:35 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:

What do we do when this isn't present?  There are plenty of cases where we can have a lambda overload candidate without a name.  We probably need to make sure that there are tests for this feature that cover lambdas in template-packs, as well as immediately invoked ones not stored to a variable.

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


More information about the cfe-commits mailing list