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-
@@ -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.
+
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
@@ -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.
+
@@ -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
@@ -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.
+
@@ -2390,7 +2390,8 @@ static bool LookupQualifiedNameInUsingDirectives(Sema &S,
LookupResult &R,
}
bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
- bool InUnqualifiedLookup) {
+ bool InUnqual
@@ -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.
+
@@ -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);
+
@@ -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(^); }
--
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn,
ArrayRef Args,
SmallVector ArgExprs(1, NakedFn);
ArgExprs.append(ArgsWithoutDependentTypes.begin(),
ArgsWithoutDependentTypes.end());
+auto *const Lam
@@ -6292,11 +6298,16 @@ SemaCodeCompletion::ProduceCallSignatureHelp(Expr *Fn,
ArrayRef Args,
SmallVector ArgExprs(1, NakedFn);
ArgExprs.append(ArgsWithoutDependentTypes.begin(),
ArgsWithoutDependentTypes.end());
+auto *const Lam
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-
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-
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
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
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-
17 matches
Mail list logo