Commit Graph

4 Commits

Author SHA1 Message Date
Kirill Bobyrev 7f0dcf665d
[clangd] Show lambda signature for lambda autocompletions
The original bug report can be found
[here](https://github.com/clangd/clangd/issues/85)

Given the following code:

```c++
void function() {
  auto Lambda = [](int a, double &b) {return 1.f;};
  La^
}
```

Triggering the completion at `^` would show `(lambda)` before this patch
and would show signature `(int a, double &b) const`, build a snippet etc
with this patch.

Reviewers: sammccall

Reviewed by: sammccall

Differential revision: https://reviews.llvm.org/D70445
2019-11-22 12:48:06 +01:00
Ilya Biryukov 47fd4f06c5 [CodeComplete] Add whitespace around braces in lambda completions
This produces nicer output.
Trivial follow-up to r361461, so sending without review.

llvm-svn: 361645
2019-05-24 16:16:15 +00:00
Ilya Biryukov fd11a5f47d [CodeComplete] Only show lambda completions if patterns are requested
This is a trivial follow-up to r361461, so sending without review.

llvm-svn: 361510
2019-05-23 16:39:26 +00:00
Ilya Biryukov 3a2f0e466b [CodeComplete] Complete a lambda when preferred type is a function
Summary: Uses a heuristic to detect std::function and friends.

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62238

llvm-svn: 361461
2019-05-23 07:45:35 +00:00