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

2024-09-11 Thread Timothy Akintilo via cfe-commits
https://github.com/tilobyte updated https://github.com/llvm/llvm-project/pull/101857 >From c1afe853ccacae1605fecfe552bb9a263c6b8c1d Mon Sep 17 00:00:00 2001 From: Timothy Akintilo Date: Sat, 27 Jul 2024 16:17:46 -0500 Subject: [PATCH 1/9] use lambda name instead of operator() --- clang-tools-

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

2024-09-10 Thread Timothy Akintilo via cfe-commits
@@ -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. +

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

2024-09-09 Thread Timothy Akintilo via cfe-commits
tilobyte wrote: > I also wonder if we would better off having `CXXRecordDecl` save its > 'variable' for lambdas (and look it up from there) rather than this. saving the `VarDecl` in the lambda's `CXXRecordDecl` indeed sounds like a cleaner solution--i will try implementing that before making a

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

2024-09-09 Thread Timothy Akintilo via cfe-commits
@@ -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. +

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -10204,15 +10205,14 @@ class Sema final : public SemaBase { /// both @c a1 and @c a2. If @p SuppressUserConversions, then don't /// allow user-defined conversions via constructors or conversion /// operators. - void - AddMethodCandidate(CXXMethodDecl *Method, DeclAcc

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -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. +

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -2390,7 +2390,8 @@ static bool LookupQualifiedNameInUsingDirectives(Sema &S, LookupResult &R, } bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, - bool InUnqualifiedLookup) { + bool InUnqual

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -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. +

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -9147,7 +9147,8 @@ class Sema final : public SemaBase { /// /// \returns true if lookup succeeded, false if it failed. bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, - bool InUnqualifiedLookup = false); +

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -1437,6 +1437,15 @@ TEST(SignatureHelpTest, Overloads) { EXPECT_EQ(0, Results.activeParameter); } +TEST(SignatureHelpTest, ShowLambdaNameInsteadOfOperatorParens) { + auto const Results = signatures(R"cpp( +auto foo = [](int x, int y){}; +int main() { foo(^); } --

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn, ArrayRef Args, SmallVector ArgExprs(1, NakedFn); ArgExprs.append(ArgsWithoutDependentTypes.begin(), ArgsWithoutDependentTypes.end()); +auto *const Lam

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

2024-09-08 Thread Timothy Akintilo via cfe-commits
https://github.com/tilobyte updated https://github.com/llvm/llvm-project/pull/101857 >From c1afe853ccacae1605fecfe552bb9a263c6b8c1d Mon Sep 17 00:00:00 2001 From: Timothy Akintilo Date: Sat, 27 Jul 2024 16:17:46 -0500 Subject: [PATCH 1/7] use lambda name instead of operator() --- clang-tools-

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

2024-09-07 Thread Timothy Akintilo via cfe-commits
https://github.com/tilobyte updated https://github.com/llvm/llvm-project/pull/101857 >From c1afe853ccacae1605fecfe552bb9a263c6b8c1d Mon Sep 17 00:00:00 2001 From: Timothy Akintilo Date: Sat, 27 Jul 2024 16:17:46 -0500 Subject: [PATCH 1/3] use lambda name instead of operator() --- clang-tools-

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

2024-09-05 Thread Timothy Akintilo via cfe-commits
tilobyte wrote: ping tagging clangd code owner for review: @sam-mccall https://github.com/llvm/llvm-project/pull/101857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-18 Thread Timothy Akintilo via cfe-commits
tilobyte wrote: Ping https://github.com/llvm/llvm-project/pull/101857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-11 Thread Timothy Akintilo via cfe-commits
https://github.com/tilobyte updated https://github.com/llvm/llvm-project/pull/101857 >From c1afe853ccacae1605fecfe552bb9a263c6b8c1d Mon Sep 17 00:00:00 2001 From: Timothy Akintilo Date: Sat, 27 Jul 2024 16:17:46 -0500 Subject: [PATCH 1/2] use lambda name instead of operator() --- clang-tools-