[clang] [clang-tools-extra] [clangd] show lambda name instead of operator() in signature help (PR #101857)
Timothy Akintilo via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 8 19:10:18 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};
----------------
tilobyte wrote:
@erichkeane i added tests for immediately-invoked lambdas. could you give an example of a lambda in a template-pack? i was thinking something like
```
template <typename... Lambda>
auto foo(Lambda... lambda) {
lambda(^);
}
```
but then the lambda has a name.
https://github.com/llvm/llvm-project/pull/101857
More information about the cfe-commits
mailing list