[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
Mon Sep 9 19:38:33 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:
thanks for the example!
i don't think this patch affects behavior in this scenario. the current behavior (preserved in this patch) is not to produce any signature help. i believe this is because within `bar()` it is not known that `Ls` has a call operator. unless i'm misunderstanding?
<img width="438" alt="Screenshot 2024-09-09 at 20 05 32" src="https://github.com/user-attachments/assets/f19431e0-3764-4530-8cf7-22cec4f8f228">
https://github.com/llvm/llvm-project/pull/101857
More information about the cfe-commits
mailing list