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

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 6 08:33:22 PDT 2024


================
@@ -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(^); }
----------------
zyn0217 wrote:

Can we have more tests for e.g. unnamed lambdas?
```cpp
[](int x, int y){}(^);
```

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


More information about the cfe-commits mailing list