[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7f0dcf665dd2: [clangd] Show lambda signature for lambda autocompletions (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ htt

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-22 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230619. kbobyrev added a comment. Get rid of incomplete identifiers in test code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ https://reviews.llvm.org/D70445 Files: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp clang/li

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Great, thanks for fixing this! Comment at: clang/test/CodeCompletion/lambdas.cpp:66 + auto my_lambda = [&](int a, double &b) { return 1.f; }; + my_ + // RUN: %clang_

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:3398 + // parameters. + auto AddTemplatedFunctionTypeAndResult = [&](const FunctionTemplateDecl + *FunTmpl) { sammccall wrote: > I

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230594. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Simplified the patch to address the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ https://reviews.llvm.org/D70445 Files: clang-tools-extra/clangd/u

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Behavior looks good, and I wouldn't extend it any further (other than to non-lambda functors someday). Implementation can be simplified a bit I think - see comment about the templated function codepath. (Would like to see one more round if that's OK, if I'm wrong abo

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang/lib/Sema/SemaCodeComplete.cpp:3335 +return nullptr; + const auto *LambdaType = VD->getType().getTypePtr(); + if (const auto *SugaredType = dyn_cast(LambdaType)) sammccall wrote: > VD->getType()->getAsCXXReco

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 230387. kbobyrev marked 12 inline comments as done. kbobyrev added a comment. Add initial support for generic lambdas, put more tests into `clang/test/CodeCompletion`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70445/new/ https://reviews.llvm.o

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp:2474 +TEST(CompletionTest, Lambda) { + clangd::CodeCompleteOptions Opts = {}; testing this in clangd is nice to have, but the canonical test for stuff in sem

[PATCH] D70445: [clangd] Show lambda signature for lambda autocompletions

2019-11-19 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. kbobyrev added projects: clang, clang-tools-extra. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay. The original bug report can be found here .