[clang-tools-extra] [clangd] Do not offer extraction to variable for decl init expression (PR #69477)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 4 01:19:20 PST 2024
================
@@ -504,68 +502,6 @@ TEST_F(ExtractVariableTest, Test) {
int main() {
auto placeholder = []() { return 42; }(); return placeholder ;
})cpp"},
- {R"cpp(
- template <typename ...Ts>
- void foo(Ts ...args) {
- auto x = [[ [&args...]() {} ]];
- }
- )cpp",
- R"cpp(
- template <typename ...Ts>
- void foo(Ts ...args) {
- auto placeholder = [&args...]() {}; auto x = placeholder ;
- }
- )cpp"},
- {R"cpp(
----------------
kadircet wrote:
for the following two can you change them to:
```
...
auto f = [[ lambda_expr ]]();
...
```
that way they should turn into
```
...
placeholder = lambda_expr;
auto f = placeholder();
...
```
https://github.com/llvm/llvm-project/pull/69477
More information about the cfe-commits
mailing list